feat(core): render local CJK glyphs at 2x texture resolution (#4304)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Taku Fukada
2026-07-01 20:52:01 +09:00
committed by GitHub
parent 60f15190c3
commit 887e6021e6
22 changed files with 357 additions and 84 deletions

View File

@@ -341,9 +341,10 @@ void OfflineDownload::activateDownload() {
const bool includeIdeographs = std::visit([](auto& reg) { return reg.includeIdeographs; }, definition);
for (const auto& fontStack : parser.fontStacks()) {
for (char16_t i = 0; i < GLYPH_RANGES_PER_FONT_STACK; i++) {
// Assumes that if a glyph range starts with fixed width/ideographic
// characters, the entire range will be fixed width.
if (includeIdeographs || !util::i18n::allowsFixedWidthGlyphGeneration(i * GLYPHS_PER_GLYPH_RANGE)) {
// Only skip a range when every codepoint in it can be
// generated locally; some ranges (e.g. 0xFF00) are mixed.
if (includeIdeographs ||
!util::i18n::glyphRangeIsEntirelyLocallyGenerated(i * GLYPHS_PER_GLYPH_RANGE)) {
auto range = getGlyphRange(i * GLYPHS_PER_GLYPH_RANGE);
queueResource(Resource::glyphs(
parser.glyphURL, fontStack, std::pair<uint16_t, uint16_t>{range.first, range.second}));