Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Unified Diff: gyp/ports.gyp

Issue 1015723004: Add option to embed font data into executable. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Clean up. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/common_variables.gypi ('k') | src/ports/SkFontHost_linux.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gyp/ports.gyp
diff --git a/gyp/ports.gyp b/gyp/ports.gyp
index 3cdc7343f585c449327c4c97c23ea5f44ad88430..0f442cde1b108db3bbb7bdd7751a192519629410 100644
--- a/gyp/ports.gyp
+++ b/gyp/ports.gyp
@@ -70,7 +70,43 @@
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "chromeos"]', {
'conditions': [
- [ 'skia_no_fontconfig', {
+ [ 'skia_embedded_fonts', {
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ ],
+ },
+ 'variables': {
+ 'embedded_font_data_identifier': 'sk_fonts',
+ 'fonts_to_include': [
+ '../resources/Funkster.ttf',
+ ],
+ },
+ 'sources': [
+ '../src/ports/SkFontHost_linux.cpp',
+ ],
+ 'actions': [{
+ 'action_name': 'generate_embedded_font_data',
+ 'inputs': [
+ '../tools/embed_resources.py',
+ '<@(fonts_to_include)',
+ ],
+ 'outputs': [
+ '<(SHARED_INTERMEDIATE_DIR)/ports/fonts/fonts.cpp',
+ ],
+ 'action': ['python', '../tools/embed_resources.py',
+ '--align', '4',
+ '--name', '<(embedded_font_data_identifier)',
+ '--input', '<@(fonts_to_include)',
+ '--output', '<@(_outputs)',
+ ],
+ 'message': 'Generating <@(_outputs)',
+ 'process_outputs_as_sources': 1,
+ }],
+ 'defines': [
+ 'SK_EMBEDDED_FONTS=<(embedded_font_data_identifier)',
+ ],
+ }, 'skia_no_fontconfig', {
'link_settings': {
'libraries': [
'-ldl',
« no previous file with comments | « gyp/common_variables.gypi ('k') | src/ports/SkFontHost_linux.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698