summaryrefslogtreecommitdiff
path: root/base/fapi_ft.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-07-31 13:34:06 +0100
committerChris Liddell <chris.liddell@artifex.com>2019-08-02 14:15:03 +0100
commit3ed82a40fd4b49728c79955319b6d67d1e092006 (patch)
tree57c19107114cbc935b6df5c6233e59a019b1946a /base/fapi_ft.c
parent1eb609f130c397144702097f4d987f3b956770f9 (diff)
downloadghostpdl-3ed82a40fd4b49728c79955319b6d67d1e092006.tar.gz
Add a way to record the selected cmap
(for the pdfi branch)
Diffstat (limited to 'base/fapi_ft.c')
-rw-r--r--base/fapi_ft.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/base/fapi_ft.c b/base/fapi_ft.c
index c9fe9ff79..60f69f644 100644
--- a/base/fapi_ft.c
+++ b/base/fapi_ft.c
@@ -1384,6 +1384,21 @@ gs_fapi_ft_get_scaled_font(gs_fapi_server * a_server, gs_fapi_font * a_font,
*/
(void)FT_Select_Charmap(face->ft_face, ft_encoding_unicode);
}
+ /* For PDF, we have to know which cmap table actually was selected */
+ if (face->ft_face->charmap != NULL) {
+ a_font->ttf_cmap_selected.platform_id = face->ft_face->charmap->platform_id;
+ a_font->ttf_cmap_selected.encoding_id = face->ft_face->charmap->encoding_id;
+ }
+ else {
+ /* Just in case */
+ a_font->ttf_cmap_selected.platform_id = -1;
+ a_font->ttf_cmap_selected.encoding_id = -1;
+ }
+ }
+ else {
+ /* Just in case */
+ a_font->ttf_cmap_selected.platform_id = -1;
+ a_font->ttf_cmap_selected.encoding_id = -1;
}
}