fontsrv: scale f->originy to match f->height on x11

Co-authored-by: dzklaim <smmoth.rp@gmail.com>
This commit is contained in:
dzklaim 2020-05-30 01:02:10 +00:00 committed by GitHub
parent 5f0fa185d0
commit 2c70acc3ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -78,7 +78,7 @@ load(XFont *f)
}
f->unit = face->units_per_EM;
f->height = (int)((face->ascender - face->descender) * 1.35);
f->originy = face->descender; // bbox.yMin (or descender) is negative, becase the baseline is y-coord 0
f->originy = face->descender * 1.35; // bbox.yMin (or descender) is negative, because the baseline is y-coord 0
for(charcode=FT_Get_First_Char(face, &glyph_index); glyph_index != 0;
charcode=FT_Get_Next_Char(face, charcode, &glyph_index)) {