summaryrefslogtreecommitdiff
path: root/src/cairo-scaled-font-subsets-private.h
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2010-10-01 17:53:11 +0930
committerAdrian Johnson <ajohnson@redneon.com>2010-10-01 17:53:11 +0930
commitf1ca978032e973c4dc5cfa385074dea675a6c76d (patch)
treee6ff3e415adccbd3e720f29c3fb7e507792c47f4 /src/cairo-scaled-font-subsets-private.h
parent3f817dcfd39ffdb73ac694fd90a47d9d3a42af74 (diff)
downloadcairo-f1ca978032e973c4dc5cfa385074dea675a6c76d.tar.gz
Add capability for font subsets to put latin glyphs in a separate subset
This is required to allow PDF/PS output to use "(this is ascii)" style strings that can be post processed by applications like psfrag. It will also reduce the file size when a large amount of latin text is used due to the 8-bit encoding instead of the 16-bit used for CID fonts. The winansi encoding (CP1252) is used for the latin subset as this is a standard PDF encoding. Some PDF readers have buggy support for non standard PDF 8-bit encodings.
Diffstat (limited to 'src/cairo-scaled-font-subsets-private.h')
-rw-r--r--src/cairo-scaled-font-subsets-private.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cairo-scaled-font-subsets-private.h b/src/cairo-scaled-font-subsets-private.h
index b165d9aca..d11959734 100644
--- a/src/cairo-scaled-font-subsets-private.h
+++ b/src/cairo-scaled-font-subsets-private.h
@@ -47,6 +47,7 @@ typedef struct _cairo_scaled_font_subsets_glyph {
unsigned int subset_glyph_index;
cairo_bool_t is_scaled;
cairo_bool_t is_composite;
+ cairo_bool_t is_latin;
double x_advance;
double y_advance;
cairo_bool_t utf8_is_mapped;
@@ -125,6 +126,18 @@ cairo_private void
_cairo_scaled_font_subsets_destroy (cairo_scaled_font_subsets_t *font_subsets);
/**
+ * _cairo_scaled_font_subsets_enable_latin_subset:
+ * @font_subsets: a #cairo_scaled_font_subsets_t object to be destroyed
+ * @use_latin: a #cairo_bool_t indicating if a latin subset is to be used
+ *
+ * If enabled, all CP1252 characters will be placed in a separate
+ * 8-bit latin subset.
+ **/
+cairo_private void
+_cairo_scaled_font_subsets_enable_latin_subset (cairo_scaled_font_subsets_t *font_subsets,
+ cairo_bool_t use_latin);
+
+/**
* _cairo_scaled_font_subsets_map_glyph:
* @font_subsets: a #cairo_scaled_font_subsets_t
* @scaled_font: the font of the glyph to be mapped