Changes between Version 1 and Version 2 of Adding_font_support
- Timestamp:
- Mar 4, 2015, 1:21:36 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Adding_font_support
v1 v2 5 5 Fonts in Pyrogenesis are prerendered by the fontbuilder tool. 6 6 7 First you need to do download the right font files (ttf, otf, ...), and place them in the [source:ps/trunk/binaries/data/tools/fontbuilder/fonts fonts] directory. F.e., to support east-asian fonts, we downloadedthe [http://fonts.jp/hanazono/ Hanazono fonts].7 First you need to do download the right font files (ttf, otf, ...), and place them in the [source:ps/trunk/binaries/data/tools/fontbuilder/fonts fonts] directory. F.e., to support east-asian fonts, you can use the [https://github.com/adobe-fonts/source-han-sans SourceHanSans fonts] or the [http://fonts.jp/hanazono/ Hanazono fonts]. 8 8 9 9 Then you need to add the font to the [source:ps/trunk/source/tools/fontbuilder2/fontbuilder.py fontbuilder] itself. If you add the font files to the back of the list, they will be used as fallback. F.e. … … 27 27 F.e., for the east-asian locales mod: 28 28 {{{ 29 binaries/system/pyrogenesis - archivebuild=binaries/data/mods/east-asian-locales -archivebuild-output=ebinaries/data/mods/east-asian-locales/ast-asian-locales.zip -archivebuild-compress29 binaries/system/pyrogenesis -mod=mod -archivebuild=binaries/data/mods/east-asian-locales -archivebuild-output=ebinaries/data/mods/east-asian-locales/ast-asian-locales.zip -archivebuild-compress 30 30 }}} 31 31 Which will result in a cached, compressed east-asian-locales.zip file, ready for distribution. … … 33 33 = Testing your fonts = 34 34 35 To make sure you test the final version, first (re)move all old files (s.a. the png files the fontbuilder made). Then place your zip in the same directory structure as the released public mod (so mods/east-asian-locales/east-asian-locales.zip for our test), and run pyrogenesis with the mod enabled .35 To make sure you test the final version, first (re)move all old files (s.a. the png files the fontbuilder made). Then place your zip in the same directory structure as the released public mod (so mods/east-asian-locales/east-asian-locales.zip for our test), and run pyrogenesis with the mod enabled (either using the mod selector, or the below command). 36 36 {{{ 37 ./pyrogenesis -mod= east-asian-locales37 ./pyrogenesis -mod=mod -mod=public -mod=east-asian-locales 38 38 }}}