Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 4346 - check pixmap/bitmap width when it's cached
Sylvain I have played more with non scalable fonts and I got them working in a better way by selecting the size index with FT_Select_Size. Font metrics appears into face->size->metrics. Also glyph metrics appears correct now. In the patch: - Fix crash when using an invalid (negative) size index. No need to save this index. - use FT_Select_Size to select the size, and get the size from "face->size->metrics" - it appears glyph metrics are corrects and same as for scalable fonts. merge both cases. => as a consequence, we only crop the pixmap up to the [minx; maxx]x[miny, maxy] - ttf_handling of bold style now works (before y_ppem was 0). - lineskip is fixed. (before it was FT_CEIL'ed when it wasn't a 26.6 frac pixel). - mis aligned (bad yoffset) is now fixed - underline and strikethrough: face->underline_offset/height were not relevant values (cf freetype doc), so use arbitrary computed values. cannot do outline and italic with non-scalable font: - prevent outline - prevent ttf_handling of italic style I've kept in TTF_Size_Internal(): maxx = SDL_max(maxx, x + glyph->advance); so it allows to render a string with only one space " ". (bug 4344).
- Loading branch information
Showing
1 changed file
with
53 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters