Hi, Sorry for the mess of emails. This is my first time using a mailing list, and I'm still getting the hang of it.
I'm aware that when drawing text, all glyphs should be aligned on a single baseline. The example I've given does not do this; it aligns the text on different font's baseline, causing the inconsistent look. When I'm talking about "aligning the baselines", I'm referring to choosing a suitable baseline from different fonts. I use the term "baseline" loosely as when rendering text from top to bottom, the ascent value is used. Initially, I plan to calculate a global baseline from all the fonts by averaging their respective baselines. Another way is to pick the "lowest" baseline (as in the highest ascent value) as the global baseline. I'm unsure of what strategy to use, so I'm curious about what approach do other applications use to solve this problem. Kelvin ------- Original Message ------- On Thursday, July 20th, 2023 at 11:56, Werner LEMBERG w...@gnu.org wrote: > [It would be nice if you could use a decent e-mail writer that creates > readable plain-text messages (which we prefer on this mailing list), > without completely garbling quoted material.] > > > > This looks like a logic error in your program. If I say `ftdump cjk.otf` > > > I get > > > > > > `ascender: 1160 descender: -288` > > > > > > among other data. > > > > > > The output of `ftdump en.ttf` gives > > > > > > `ascender: 935 descender: -265` > > > > > > This is perfectly fine. [...] > > > > Thank you for pointing it out. I'm unsure about the strategy to > > align the baselines. The simplest would be aligning to the lowest / > > highest baselines, but that may break some faces. > > Uh, oh, please update your knowledge on how fonts are actually working > within the frame of typography. There is no 'lowest' or 'highest' > baseline – there is only the baseline (assuming horizontal > typesetting). It is the very idea of a baseline that all glyphs of > all fonts are by default aligned on that! There exist additional > concepts like superscript or subscript, but this is something else and > not relevant here, as far as I can see. > > Maybe you want to achieve something different, I don't know. Please > educate yourself in advance to use the right technical terms so that > we can actually communicate without misunderstandings. > > You might have a look at > > https://freetype.org/freetype2/docs/glyphs/glyphs-3.html > > as a starter. > > Werner