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:
@@ -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}));
|
||||
|
||||
Reference in New Issue
Block a user