Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit d30c3f5

Browse files
committed
Merge pull request #45 from livecode/peter-b/js/bugfix-15811
[Bug 15811][emscripten] Tweaks to libskia font support
2 parents 1c52a8e + 0917f44 commit d30c3f5

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

libskia/libskia.gyp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@
426426
'src/ports/SkAtomics_win.h',
427427
'src/ports/SkFontConfigParser_android.h',
428428
'src/ports/SkFontConfigTypeface.h',
429-
'src/ports/SkFontHost_FreeType_common.h',
430429
'src/ports/SkMutex_none.h',
431430
'src/ports/SkMutex_pthread.h',
432431
'src/ports/SkMutex_win.h',
@@ -555,22 +554,29 @@
555554
{
556555
'sources!':
557556
[
558-
'src/ports/SkFontHost_fontconfig.cpp',
559557
'src/ports/SkFontHost_FreeType.cpp',
560558
'src/ports/SkFontHost_FreeType_common.cpp',
561-
'src/fonts/SkFontMgr_fontconfig.cpp',
562-
563559
'src/sfnt/SkOTTable_name.cpp',
564560
'src/sfnt/SkOTUtils.cpp',
565561
],
566562
},
567563
],
564+
[
565+
'OS != "android"',
566+
{
567+
'sources!':
568+
[
569+
'src/ports/SkFontHost_fontconfig.cpp',
570+
'src/fonts/SkFontMgr_fontconfig.cpp',
571+
],
572+
},
573+
],
568574
[
569575
'OS == "emscripten"',
570576
{
571577
'defines':
572578
[
573-
'SK_FONT_FILE_PREFIX="/boot/fonts/"',
579+
'SK_FONT_FILE_PREFIX="/boot/standalone/"',
574580
],
575581

576582
'dependencies':

libskia/src/ports/SkFontHost_linux.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ class SkFontMgr_Custom : public SkFontMgr {
379379
static const char* gDefaultNames[] = {
380380
"Arial", "Verdana", "Times New Roman", NULL
381381
};
382+
gDefaultNormal = NULL;
382383
for (size_t i = 0; i < SK_ARRAY_COUNT(gDefaultNames); ++i) {
383384
SkFontStyleSet_Custom* set = this->onMatchFamily(gDefaultNames[i]);
384385
if (NULL == set) {

0 commit comments

Comments
 (0)