Compare commits

..
Author SHA1 Message Date
anasandClaude Opus 5 6590a6b21a Move the download under the opening paragraph
Below the tech line is already too far down. Someone who has just read what the
app is wants the app next, not the toolkit it is written in.

One line now, as a heading so it reads as a button rather than prose, with the
facts that decide whether to tap it beside it — Android version, size, older
releases, checksum — and the install warning under it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-07 23:19:32 +02:00
anasandClaude Opus 5 66d8b82648 Put the download where someone looking for it will look
The APK has been in releases/ all along, but nothing on the front page said so,
and the first thing most people want from an app's repository is the app.

A Download section above the fold: the current build as a relative link that
works on any forge, the raw URL spelled out for anywhere the relative one does
not resolve, the checksum to verify it, and a pointer to releases/ for every
earlier version.

It also says plainly that Android will call the developer unknown and ask to
install anyway. That warning is what Android says about every app installed
outside a store, and read cold it looks like the app is unsafe rather than
merely unlisted — better to say so first than to let someone find out and
assume the worst.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-07 23:17:49 +02:00
2 changed files with 17 additions and 24 deletions

No files matched your search

+9
View File
@@ -13,6 +13,15 @@ An Android reader for [Ganjoor](https://ganjoor.net), the open archive of Persia
240 poets and ~135,000 poems, laid out for comfortable long-form reading in Persian, Urdu
and Arabic script, online or fully offline.
### ⬇ [Download ganjoor-0.4.0.apk](releases/ganjoor-0.4.0.apk)
Android 7.0 and up · 31.7 MB · [older releases](releases/) · `sha256 1c64cefa…fb863ab9fc7`
Android will call the developer unknown and offer to install anyway — it says that about every
app installed outside a store. Allow installs from your browser once and it will go through.
Every release is signed with the same key, so a new one upgrades the last without losing your
bookmarks. [Build it yourself](#build) instead if you would rather.
Jetpack Compose, Material 3, `minSdk 24`. No account, no tracking, no server of its own.
## Reading
@@ -1,12 +1,12 @@
package com.ganjoor.android.ui.theme
import android.os.Build
import androidx.compose.material3.Typography
import androidx.compose.ui.text.ExperimentalTextApi
import androidx.compose.ui.text.PlatformTextStyle
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.Font
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontVariation
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.TextUnit
@@ -15,40 +15,24 @@ import com.ganjoor.android.R
import com.ganjoor.android.ui.ReadingFont
/**
* Both files are variable fonts, registered at four weights so a reader can thicken the text —
* thin naskh strokes wash out on a lit screen, especially in the dark themes.
* Both files are variable fonts with a `wght` axis, registered at four weights so a reader can
* thicken the text — thin naskh strokes wash out on a lit screen, especially in the dark themes.
*
* Only `wght` is asked for, and deliberately: both files carry that one axis and nothing else.
* `FontVariation.Settings(weight, style)` would also send `ital`, and a font with no italic axis
* is entitled to refuse the whole request rather than the part it cannot honour. A platform that
* does so leaves every weight drawing at 400 — and silently, because each entry here declares the
* weight it was asked for, so the text is never a candidate for synthetic bolding either.
* Real axis interpolation needs API 26+; on 24 and 25 the variation settings are ignored and
* Android falls back to synthesising the heavier weights, which still darkens the text.
*/
@OptIn(ExperimentalTextApi::class)
private fun variable(resId: Int, weight: FontWeight) = Font(
resId = resId,
weight = weight,
variationSettings = FontVariation.Settings(FontVariation.weight(weight.weight)),
variationSettings = FontVariation.Settings(weight, FontStyle.Normal),
)
private val weights =
listOf(FontWeight.Normal, FontWeight.Medium, FontWeight.SemiBold, FontWeight.Bold)
/**
* Variable axes need API 26. Below that the settings above are dropped, and declaring four
* weights of the same file would make the heavier ones unreachable: Android would match the
* entry claiming 700, draw it at 400, and skip synthetic bolding because the entry said it was
* already bold. One entry at its real weight instead, so asking for bold actually synthesises it.
*/
private fun scriptFamily(resId: Int): FontFamily =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
FontFamily(weights.map { variable(resId, it) })
} else {
FontFamily(Font(resId, FontWeight.Normal))
}
val Naskh = scriptFamily(R.font.noto_naskh_arabic)
val Nastaliq = scriptFamily(R.font.noto_nastaliq_urdu)
val Naskh = FontFamily(weights.map { variable(R.font.noto_naskh_arabic, it) })
val Nastaliq = FontFamily(weights.map { variable(R.font.noto_nastaliq_urdu, it) })
/**
* The English UI only. Libron is a reading serif (OFL, github.com/nicoverbruggen/libron) and