summaryrefslogtreecommitdiff
path: root/vcl/source/fontsubset/sft.cxx
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2019-08-27 15:19:15 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2019-09-03 23:48:17 +0200
commitdcf7792da2aa2a1ef774a124f7b21f68fff0fd15 (patch)
tree1ef613fdde043fe142a2a4e3bdcbbc03c0577bd2 /vcl/source/fontsubset/sft.cxx
parente44db461ca135fcbef7854c7304c894b65fcd497 (diff)
Make Noto Color Emoji font work on Linux
Noto Color Emoji is a bitmap color font, Cairo knows how to scale such fonts and FontConfig will identify them as scalable but not outline fonts, so change the FontConfig checks to checks for scalability. Make sft.cxx:doOpenTTFont() accept non-outline fonts, the text will not show in PDF but that is not worse than the status quo. Change-Id: I756c718296d2c43e3165cd2f07b11bbb981318d3 Reviewed-on: https://gerrit.libreoffice.org/78218 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/source/fontsubset/sft.cxx')
-rw-r--r--vcl/source/fontsubset/sft.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 47e4f7a8d7f4..52b2e0360b50 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1669,7 +1669,10 @@ static SFErrCodes doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
/* TODO: implement to get subsetting */
assert(t->goffsets != nullptr);
} else {
- return SFErrCodes::TtFormat;
+ // Bitmap font, accept for now.
+ t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32)));
+ /* TODO: implement to get subsetting */
+ assert(t->goffsets != nullptr);
}
table = getTable(t, O_hhea);