aboutsummaryrefslogtreecommitdiff
path: root/font.c (follow)
Commit message (Collapse)AuthorAgeLines
* font: add support for fallback fontsDaniel Eklöf2019-07-30-32/+187
| | | | | | | | | | | | | | | A top-level font now has a list of fallback fonts. When a glyph cannot be found, we try each fallback font in turn, until we either find one that has the glyph, or until we've exhausted the list. To make this actually work in practise (read: to make performance acceptable), the cache is re-worked and is now populated on demand. It also supports non-ASCII characters, by using the 4-byte unicode character as index instead. Since having an array that can be indexed by a 4-byte value isn't really viable, we now have a simple hash table instead of an array.
* font: set FT load and render flags from FontConfig propertiesDaniel Eklöf2019-07-29-18/+121
|
* font: populate glyph cache (ASCII characters only) when instantiating fontDaniel Eklöf2019-07-28-0/+25
|
* font: add font_glyph_for_utf8()Daniel Eklöf2019-07-28-0/+76
| | | | | | This function fills in a struct glyph with glyph bitmap data for the provided utf-8 character (essentially a FT_Bitmap wrapped in a cairo surface).
* cairo-ft: remove all usages of cairo-ftDaniel Eklöf2019-07-28-38/+0
|
* font: load FreeType face, and set it's pixel sizesDaniel Eklöf2019-07-28-15/+48
|
* font: don't warn when failing to get hinting/antialiasDaniel Eklöf2019-07-18-6/+2
| | | | | | | These properties aren't always included in the pattern, and when they aren't, trying to get them will fail. This isn't an error, just fallback to a default value.
* font: remove assert that was only there for debuggingDaniel Eklöf2019-07-18-1/+0
|
* font: sync cairo's options with the FC patternDaniel Eklöf2019-07-17-1/+24
| | | | | | Configure cairo's 'options' with default values, then update the FontConfig pattern. Finally, update the cairo options after having retrieved the final FontConfig option.
* initial grid implementationDaniel Eklöf2019-06-13-0/+85
This allows us to render *something*, even though it's inefficient, stupid and far far away from the real thing.