by zachlloyd on 7/27/22, 3:46 PM with 17 comments
by deathanatos on 7/27/22, 6:07 PM
It's more complicated than that, too. (But just about every terminal I've ever used at one point or another has made that buggy assumption!) Emoji and wide CJK characters typically take two terminal cells.
For example (and HN will corrupt the output of this command, as it will remove the emoji):
» python3 -c 'print("1234567890\n\N{PILE OF POO}x\u4e09x")'
1234567890
x三x
The second "x" should align under the 6. 4 glyphs, 6 cells.(I am a bit curious about the subpixel stuff. I've done font atlases, but IME Harfbuzz — the shaping engine I've used — only seems to emit integral advances? (Although I'm now wanting to re-test that assumption.) And I'm not entirely sure I know how to ask FreeType to render a glyph with an offset, either.)
by skavi on 7/27/22, 7:24 PM
Doesn't exactly instill confidence in the advertised product.
by boywitharupee on 7/27/22, 7:08 PM
A few questions I have:
1. Is the pixel grid global to the the screen? or is it specific to application? Can different applications on OS have different pixel grids? Not sure where pixel grids come from
2. Sounds painful to write your own font rendering system. Why doesn't Warp use OS level libs CoreText, etc?
3. I know there are many font rendering techniques such as texture, distance and geometry based. The most recent one is pathfinder technique, which is geometry based? Which one does Warp uses?
4. In which step the font rendering pipeline spends most time? Is it the shaping? rasterization? font file parsing?
by pseudosavant on 7/27/22, 6:17 PM
by dubiousconst281 on 7/28/22, 12:09 PM
by billconan on 7/27/22, 5:28 PM
How to do font fallback? For example, a user uses an English font "Arial", and suddenly she types a Chinese character. the character doesn't present in Arial, so we need to find a fallback font that does.
Let's say we find one, but the fallback font has different sizing. How to scale the character to match the other font? What about kerning and other positioning issues?
And also, is your cache ever increasing? Imagine a user zooms in, do you retire those small glyphs?
by gumby on 7/27/22, 5:48 PM