The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Skip private use area and control characters in fallback font

These changes was commited to the Birdfont repository Sun, 24 May 2015 15:38:34 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 24 May 2015 15:38:34 +0000 (17:38 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sun, 24 May 2015 15:38:34 +0000 (17:38 +0200)
commit 1a50018fbe30abb2816d9f17bd80861fd268b384
tree 6a3217253caca93adc435d891d0f1df5b92a51ac
parent 2f8aa2e962a382745feb34640b2b602ac18b8b31
Skip private use area and control characters in fallback font

libbirdfont/Renderer/FallbackFont.vala
--- a/libbirdfont/Renderer/FallbackFont.vala +++ b/libbirdfont/Renderer/FallbackFont.vala @@ -105,6 +105,16 @@ font_file = null; glyph_data = null; + // don't use fallback font for private use area + if (0xe000 <= c <= 0xf8ff) { + return bf_font; + } + + // control characters + if (c <= 0x001f) { + return bf_font; + } + // check if glyph is available in roboto if (font_file == null) { roboto = SearchPaths.search_file (null, "Roboto-Regular.ttf");