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

@@ -71,7 +71,8 @@ void GlyphManager::getGlyphs(GlyphRequestor& requestor, GlyphDependencies glyphD
Glyph GlyphManager::generateLocalSDF(const FontStack& fontStack, GlyphID glyphID) {
Glyph local = localGlyphRasterizer->rasterizeGlyph(fontStack, glyphID);
local.bitmap = util::transformRasterToSDF(local.bitmap, 8, .25);
const double radius = local.metrics.isDoubleResolution ? 16.0 : 8.0;
local.bitmap = util::transformRasterToSDF(local.bitmap, radius, .25);
return local;
}