diff --git a/README.md b/README.md index 9b4b74f..66926e4 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ The easiest way to turn your custom fonts into files compatible with [MapLibre G For other prepared fonts, look at [maplibre/demotiles/font](https://github.com/maplibre/demotiles/tree/gh-pages/font) instead. +For an example of using font-maker on the command line to cover as much of Unicode as possible, see the [protomaps/basemaps-assets](https://github.com/protomaps/basemaps-assets) repository. + ## Usage * Go to the web app at [maplibre.org/font-maker/](https://maplibre.org/font-maker/) and select your file. @@ -20,6 +22,8 @@ For command line usage and developing, see [CONTRIBUTING.md](CONTRIBUTING.md) If the MapLibre renderer does not find a matching codepoint in the current font, it will skip display of that character. +See @wipfli's [Text Rendering in MapLibre guide](https://github.com/wipfli/about-text-rendering-in-maplibre) for details on the drawbacks of mapping 1 codepoint to 1 glyph. + ### CJK (Chinese, Japanese, Korean) text The `font-maker` demo app has [local ideographs](https://maplibre.org/maplibre-gl-js-docs/example/local-ideographs/) enabled which is the default for most MapLibre applications. Generated fonts that include CJK ranges will display system default fonts instead of generated fonts. diff --git a/examples/.gitignore b/examples/.gitignore deleted file mode 100644 index cfcfc15..0000000 --- a/examples/.gitignore +++ /dev/null @@ -1 +0,0 @@ -notofonts.github.io* diff --git a/examples/NotoSansBold.sh b/examples/NotoSansBold.sh deleted file mode 100755 index 4e59c32..0000000 --- a/examples/NotoSansBold.sh +++ /dev/null @@ -1,28 +0,0 @@ -ROOT=notofonts.github.io-main/fonts/ -PATH=unhinted/ttf - -../font-maker --name "Noto Sans Bold" out2 \ -$ROOT/NotoSans/$PATH/NotoSans-Bold.ttf \ -$ROOT/NotoSansArmenian/$PATH/NotoSansArmenian-Bold.ttf \ -$ROOT/NotoSansHebrew/$PATH/NotoSansHebrew-Bold.ttf \ -$ROOT/NotoSansArabic/$PATH/NotoSansArabic-Bold.ttf \ -$ROOT/NotoSansThaana/$PATH/NotoSansThaana-Bold.ttf \ -$ROOT/NotoSansDevanagari/$PATH/NotoSansDevanagari-Bold.ttf \ -$ROOT/NotoSansBengali/$PATH/NotoSansBengali-Bold.ttf \ -$ROOT/NotoSansGurmukhi/$PATH/NotoSansGurmukhi-Bold.ttf \ -$ROOT/NotoSansGujarati/$PATH/NotoSansGujarati-Bold.ttf \ -$ROOT/NotoSansOriya/$PATH/NotoSansOriya-Bold.ttf \ -$ROOT/NotoSansTamil/$PATH/NotoSansTamil-Bold.ttf \ -$ROOT/NotoSansTelugu/$PATH/NotoSansTelugu-Bold.ttf \ -$ROOT/NotoSansKannada/$PATH/NotoSansKannada-Bold.ttf \ -$ROOT/NotoSansMalayalam/$PATH/NotoSansMalayalam-Bold.ttf \ -$ROOT/NotoSansSinhala/$PATH/NotoSansSinhala-Bold.ttf \ -$ROOT/NotoSansThai/$PATH/NotoSansThai-Bold.ttf \ -$ROOT/NotoSansLao/$PATH/NotoSansLao-Bold.ttf \ -$ROOT/NotoSansMyanmar/$PATH/NotoSansMyanmar-Bold.ttf \ -$ROOT/NotoSansGeorgian/$PATH/NotoSansGeorgian-Bold.ttf \ -$ROOT/NotoSansEthiopic/$PATH/NotoSansEthiopic-Bold.ttf \ -$ROOT/NotoSansCherokee/$PATH/NotoSansCherokee-Bold.ttf \ -$ROOT/NotoSansKhmer/$PATH/NotoSansKhmer-Bold.ttf \ -$ROOT/NotoSansSymbols/$PATH/NotoSansSymbols-Bold.ttf \ -$ROOT/NotoSansCham/$PATH/NotoSansCham-Bold.ttf \ No newline at end of file diff --git a/examples/NotoSansRegular.sh b/examples/NotoSansRegular.sh deleted file mode 100755 index 5655c78..0000000 --- a/examples/NotoSansRegular.sh +++ /dev/null @@ -1,66 +0,0 @@ -ROOT=notofonts.github.io-main/fonts/ -PATH=unhinted/ttf - -../font-maker --name "Noto Sans Regular" out \ -$ROOT/NotoSans/$PATH/NotoSans-Regular.ttf \ -$ROOT/NotoSansArmenian/$PATH/NotoSansArmenian-Regular.ttf \ -$ROOT/NotoSansHebrew/$PATH/NotoSansHebrew-Regular.ttf \ -$ROOT/NotoSansArabic/$PATH/NotoSansArabic-Regular.ttf \ -$ROOT/NotoSansSyriac/$PATH/NotoSansSyriac-Regular.ttf \ -$ROOT/NotoSansThaana/$PATH/NotoSansThaana-Regular.ttf \ -$ROOT/NotoSansNKo/$PATH/NotoSansNKo-Regular.ttf \ -$ROOT/NotoSansSamaritan/$PATH/NotoSansSamaritan-Regular.ttf \ -$ROOT/NotoSansDevanagari/$PATH/NotoSansDevanagari-Regular.ttf \ -$ROOT/NotoSansBengali/$PATH/NotoSansBengali-Regular.ttf \ -$ROOT/NotoSansGurmukhi/$PATH/NotoSansGurmukhi-Regular.ttf \ -$ROOT/NotoSansGujarati/$PATH/NotoSansGujarati-Regular.ttf \ -$ROOT/NotoSansOriya/$PATH/NotoSansOriya-Regular.ttf \ -$ROOT/NotoSansTamil/$PATH/NotoSansTamil-Regular.ttf \ -$ROOT/NotoSansTelugu/$PATH/NotoSansTelugu-Regular.ttf \ -$ROOT/NotoSansKannada/$PATH/NotoSansKannada-Regular.ttf \ -$ROOT/NotoSansMalayalam/$PATH/NotoSansMalayalam-Regular.ttf \ -$ROOT/NotoSansSinhala/$PATH/NotoSansSinhala-Regular.ttf \ -$ROOT/NotoSansThai/$PATH/NotoSansThai-Regular.ttf \ -$ROOT/NotoSansLao/$PATH/NotoSansLao-Regular.ttf \ -$ROOT/NotoSerifTibetan/$PATH/NotoSerifTibetan-Regular.ttf \ -$ROOT/NotoSansMyanmar/$PATH/NotoSansMyanmar-Regular.ttf \ -$ROOT/NotoSansGeorgian/$PATH/NotoSansGeorgian-Regular.ttf \ -$ROOT/NotoSansEthiopic/$PATH/NotoSansEthiopic-Regular.ttf \ -$ROOT/NotoSansCherokee/$PATH/NotoSansCherokee-Regular.ttf \ -$ROOT/NotoSansCanadianAboriginal/$PATH/NotoSansCanadianAboriginal-Regular.ttf \ -$ROOT/NotoSansOgham/$PATH/NotoSansOgham-Regular.ttf \ -$ROOT/NotoSansRunic/$PATH/NotoSansRunic-Regular.ttf \ -$ROOT/NotoSansTagalog/$PATH/NotoSansTagalog-Regular.ttf \ -$ROOT/NotoSansHanunoo/$PATH/NotoSansHanunoo-Regular.ttf \ -$ROOT/NotoSansBuhid/$PATH/NotoSansBuhid-Regular.ttf \ -$ROOT/NotoSansTagbanwa/$PATH/NotoSansTagbanwa-Regular.ttf \ -$ROOT/NotoSansKhmer/$PATH/NotoSansKhmer-Regular.ttf \ -$ROOT/NotoSansMongolian/$PATH/NotoSansMongolian-Regular.ttf \ -$ROOT/NotoSansLimbu/$PATH/NotoSansLimbu-Regular.ttf \ -$ROOT/NotoSansTaiLe/$PATH/NotoSansTaiLe-Regular.ttf \ -$ROOT/NotoSansNewTaiLue/$PATH/NotoSansNewTaiLue-Regular.ttf \ -$ROOT/NotoSansBuginese/$PATH/NotoSansBuginese-Regular.ttf \ -$ROOT/NotoSansTaiTham/$PATH/NotoSansTaiTham-Regular.ttf \ -$ROOT/NotoSansBalinese/$PATH/NotoSansBalinese-Regular.ttf \ -$ROOT/NotoSansSundanese/$PATH/NotoSansSundanese-Regular.ttf \ -$ROOT/NotoSansBatak/$PATH/NotoSansBatak-Regular.ttf \ -$ROOT/NotoSansLepcha/$PATH/NotoSansLepcha-Regular.ttf \ -$ROOT/NotoSansOlChiki/$PATH/NotoSansOlChiki-Regular.ttf \ -$ROOT/NotoSansSymbols/$PATH/NotoSansSymbols-Regular.ttf \ -$ROOT/NotoSansSymbols2/$PATH/NotoSansSymbols2-Regular.ttf \ -$ROOT/NotoSansGlagolitic/$PATH/NotoSansGlagolitic-Regular.ttf \ -$ROOT/NotoSansCoptic/$PATH/NotoSansCoptic-Regular.ttf \ -$ROOT/NotoSansTifinagh/$PATH/NotoSansTifinagh-Regular.ttf \ -$ROOT/NotoSansYi/$PATH/NotoSansYi-Regular.ttf \ -$ROOT/NotoSansLisu/$PATH/NotoSansLisu-Regular.ttf \ -$ROOT/NotoSansVai/$PATH/NotoSansVai-Regular.ttf \ -$ROOT/NotoSansBamum/$PATH/NotoSansBamum-Regular.ttf \ -$ROOT/NotoSansSylotiNagri/$PATH/NotoSansSylotiNagri-Regular.ttf \ -$ROOT/NotoSansPhagsPa/$PATH/NotoSansPhags-Pa-Regular.ttf \ -$ROOT/NotoSansSaurashtra/$PATH/NotoSansSaurashtra-Regular.ttf \ -$ROOT/NotoSansKayahLi/$PATH/NotoSansKayahLi-Regular.ttf \ -$ROOT/NotoSansRejang/$PATH/NotoSansRejang-Regular.ttf \ -$ROOT/NotoSansJavanese/$PATH/NotoSansJavanese-Regular.ttf \ -$ROOT/NotoSansCham/$PATH/NotoSansCham-Regular.ttf \ -$ROOT/NotoSansTaiViet/$PATH/NotoSansTaiViet-Regular.ttf \ -$ROOT/NotoSansMeeteiMayek/$PATH/NotoSansMeeteiMayek-Regular.ttf \ No newline at end of file diff --git a/main.cpp b/main.cpp index 3f0e461..dda1a2c 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,6 @@ #define BOOST_NO_CXX98_FUNCTION_BASE // workaround unary_function in boost::geometry +#include #include "mapbox/glyph_foundry.hpp" #include "mapbox/glyph_foundry_impl.hpp" #include