Summary: | Win32 bitmap fonts (*.fon) does not show up nor return any error status | ||
---|---|---|---|
Product: | cairo | Reporter: | Jan Słupski <jslupski> |
Component: | win32 backend | Assignee: | Owen Taylor <otaylor> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | CC: | ajohnson, jslupski |
Version: | 1.2.6 | ||
Hardware: | x86 (IA32) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | workaround: Force Windows to select from among TrueType fonts only |
Description
Jan Słupski
2007-01-22 18:45:38 UTC
Created attachment 8482 [details] [review] workaround: Force Windows to select from among TrueType fonts only Proposed solutions: 1. Add support for the windows bitmap fonts - this can be difficult since lack of scaling, and rotation only at 0, 90, 180, 270 degrees 2. Return an error status indicating that this kind of font is available on the system but unsupported 3. Treat the bitmap font like missing/unknown font (i.e. use default one) 3a. Force Windows to select from among scalable fonts only. Attached patch adds OUT_TT_ONLY_PRECIS flag to CreateFontIndirect call. OUT_TT_ONLY_PRECIS: Instructs the font mapper to choose from only TrueType fonts. If there are no TrueType fonts installed in the system, the font mapper returns to default behavior. "only TrueType fonts" may be to limiting, but seems to be good workaround (at the moment at least)... Alternative OUT_OUTLINE_PRECIS option didn't seem to work for me. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_4rw4.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/fontext_1wmq.asp There has been some recent patches committed to fix Windows bitmap fonts. The latest git version should work for bitmap fonts that are not rotated. The workaround you suggested can be done from your application. Just set the LOGFONT to filter out bitmaps then call cairo_win32_font_face_create_for_logfontw(). Also your patch excludes OpenType/PS and Type 1 fonts. I would suggest: logfont.lfOutPrecision = OUT_OUTLINE_PRECIS Closing this as the original bug report "bitmap fonts do not show up" has been fixed. Since 1.8.0 bitmap fonts should be working fine. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.