Summary: | Cannot set italic slant on mac with quartz font backend | ||
---|---|---|---|
Product: | cairo | Reporter: | Igor Nikitin <igor_nikitin> |
Component: | quartz font backend | Assignee: | Vladimir Vukicevic <vladimir> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.10.0 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Mac OS X (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | result file |
Description
Igor Nikitin
2010-09-15 00:10:26 UTC
Created attachment 38714 [details]
result file
The default "Lucida Grande" available on MacOS X has no italic variant. To confirm this look for Lucida Grande in Font Book or write "TEST" in TextEdit, set its font to Lucida Grande and try to make it Italic. If you want to use SLANT_ITALIC, you need a font which actually has an italic shape. (Please notice that some fonts have oblique style instead of italic and the quartz font backend considers them to be different). Thanks for reply, whether it is possible to check up presence of the necessary font somehow? cairo_select_font_face( target, "Lucida Grande", // Default font on mac CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL ); cairo_status_t status = cairo_status( mpTarget ); // Here status == CAIRO_STATUS_SUCCESS (In reply to comment #3) > Thanks for reply, whether it is possible to check up presence of the necessary > font somehow? Cairo does its best to provide a font that looks like the one you asked for, but will fallback to less and less similar fonts, ending with "Helvetica" (normal) if it can't find what you were asking for. If you want to make sure the font will be the one you specified, you should probably use CGFontCreateWithFontName to create the CGFont and cairo_quartz_font_face_create_for_cgfont to use it within cairo. (In reply to comment #4) > If you want to make sure the font will be the one you specified, you should > probably use CGFontCreateWithFontName to create the CGFont and > cairo_quartz_font_face_create_for_cgfont to use it within cairo. thanks |
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.