Last active
July 10, 2020 03:48
-
-
Save rsheeter/42808b2c6644736eaab0d324f58e29a9 to your computer and use it in GitHub Desktop.
Compile drott color demo w/o Chrome source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: prefer https://github.com/rsheeter/skia_colr/tree/colr_test, build_mac_colr.sh | |
git clone https://skia.googlesource.com/skia | |
cd skia | |
# download https://skia-review.googlesource.com/c/skia/+/300558 | |
# What I actually did: click download, http, and take the Branch example, e.g: | |
# git fetch "https://skia.googlesource.com/skia" refs/changes/58/300558/2 && git checkout -b change-300558 FETCH_HEAD | |
# Probably better: | |
git cl patch 300558 | |
# Now lets build it | |
./bin/fetch_gn | |
./tools/git-sync-deps | |
# Switch to Dominik's FT | |
cd third_party/externals/freetype | |
git remote add drott_ft_colr https://github.com/drott/freetype2-colr | |
git fetch drott_ft_colr | |
git checkout -b colr_v1 drott_ft_colr/colrV1API | |
# Back to root of Skia | |
cd ../../.. | |
# Edit ./third_party/freetype2/include/freetype-android/ftmodule.h | |
# Not sure why this is necessary | |
# Comment out lcd renderer classes | |
//FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class ) | |
//FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class ) | |
# Download https://chromium-review.googlesource.com/c/chromium/src/+/2282815/2/skia_test/skia_test.cc | |
# Place in tools/colr_test/ | |
# Add a new entry to BUILD.gn, immediately after test_app("make_skqp_model") | |
test_app("colr_test") { | |
sources = [ | |
"tools/colr_test/skia_test.cc" | |
] | |
deps = [ | |
":skia", | |
"//third_party/freetype2", | |
] | |
} | |
# Args somewhat based on https://skia.org/dev/testing/fuzz | |
./bin/gn args out/Static | |
# Args | |
is_official_build = false | |
skia_use_fontconfig=false | |
skia_use_freetype=true | |
skia_use_system_freetype2=false | |
skia_enable_fontmgr_custom_directory=false | |
skia_enable_fontmgr_custom_embedded=false | |
skia_enable_fontmgr_custom_empty=true | |
# End Args | |
# gn args runs gen; only need this if you fiddled with BUILD.gn or something | |
./bin/gn gen out/Static | |
ninja -C out/Static | |
# Download https://chromium-review.googlesource.com/c/chromium/src/+/2282815/2/skia_test/samples-colr_1.ttf | |
# Place the ttf in skia_test/samples-colr_1.ttf (to match kTestFileName) | |
./out/Static/colr_test | |
# Should print a bunch of debug noise about gradients and stops | |
# You should now have a shiny new colr_v1_glyph.png file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment