[cairo-commit] 3 commits - src/cairo-ft-font.c src/.gitignore
Behdad Esfahbod
behdad at kemper.freedesktop.org
Fri Jan 25 15:29:58 PST 2008
src/.gitignore | 1 +
src/cairo-ft-font.c | 18 ++++++++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit ab188f2e90b49fc4e07f04dc512f9fb9864efa0b
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jan 25 17:44:26 2008 -0500
[cairo-ft] Disable embedded bitmaps if hinting style NONE is requested
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index d70f379..708578d 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1288,9 +1288,6 @@ _get_pattern_ft_options (FcPattern *pattern, cairo_ft_options_t *ret)
if (antialias) {
cairo_subpixel_order_t subpixel_order;
- if (!bitmap)
- ft_options.load_flags |= FT_LOAD_NO_BITMAP;
-
/* disable hinting if requested */
if (FcPatternGetBool (pattern,
FC_HINTING, 0, &hinting) != FcResultMatch)
@@ -1353,6 +1350,14 @@ _get_pattern_ft_options (FcPattern *pattern, cairo_ft_options_t *ret)
ft_options.base.hint_style = CAIRO_HINT_STYLE_NONE;
}
#endif /* FC_HINT_STYLE */
+
+ /* Force embedded bitmaps off if no hinting requested */
+ if (ft_options.base.hint_style == CAIRO_HINT_STYLE_NONE)
+ bitmap = FcFalse;
+
+ if (!bitmap)
+ ft_options.load_flags |= FT_LOAD_NO_BITMAP;
+
} else {
ft_options.base.antialias = CAIRO_ANTIALIAS_NONE;
}
commit 2df9944a8ac48cb43845e56c5483bf77dafda584
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jan 25 17:12:34 2008 -0500
[.gitignore] Add check-has-hidden-symbols.i
diff --git a/src/.gitignore b/src/.gitignore
index fa92650..33d29ca 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -21,3 +21,4 @@ cairo.def
*~
.*.sw?
TAGS
+check-has-hidden-symbols.i
commit 3d2144b6af07ca44b6fbf1c96080b7e2b7c0285c
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Fri Jan 25 17:06:11 2008 -0500
[cairo-ft] Fix font metrics computation for bitmap fonts and no metrics-hinting
Preivously we were returning NAN font metrics. Fixed now. Makes bitmap-font
test pass again.
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 4919c4e..d70f379 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -1513,8 +1513,13 @@ _cairo_ft_scaled_font_create (cairo_ft_unscaled_font_t *unscaled,
/*
* Get to unscaled metrics so that the upper level can get back to
* user space
+ *
+ * Also use this path for bitmap-only fonts. The other branch uses
+ * face members that are only relevant for scalable fonts. This is
+ * detected by simply checking for units_per_EM==0.
*/
- if (scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF) {
+ if (scaled_font->base.options.hint_metrics != CAIRO_HINT_METRICS_OFF ||
+ face->units_per_EM == 0) {
double x_factor, y_factor;
if (unscaled->x_scale == 0)
More information about the cairo-commit
mailing list