Hi, 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. The other method would be the one I mentioned - calculate an "average" baseline and align to that, but it has the same drawbacks. Are there other methods that I've missed? -------- Original Message -------- On 19 Jul 2023, 20:20, Werner LEMBERG < w...@gnu.org> wrote:
>> Thank you for your reply. I attached a example program, test.c > which uses >> SDL2 to render text with the method I mentioned. The > program doesn't take >> any arguments and should produce a file called > result.bmp in the current >> directory. I've also attached two fonts, > cjk.otf and en.ttf as they're the >> font I used. Put everything in > the same directory and it should work. 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 height: 1200 ``` >> This is perfectly fine. I've attached images of ``` ftgrid -e unic -f 20320 >> cjk.otf ftgrid -e unic -f 70 en.ttf ``` and you can see that the glyphs >> harmonize just fine if you align the baselines of the two fonts. Werner