summaryrefslogtreecommitdiffstats
path: root/font/src/ft/fc/mod.rs
AgeCommit message (Collapse)Author
2020-07-18Rename font crate to crossfontChristian Duerr
2020-06-06Remove copyright notice from filesChristian Duerr
Keeping the license as part of every file bloats up the files unnecessarily and introduces an additional overhead to the creation of new modules. Since cargo already provides excellent dependency management, most of the code-reuse of Alacritty should occur through Rust's dependency management instead of copying it source. If code is copied partially, copying the license from the main license file should be just as easy as copying from the top of the file and making some adjustments based on where it is used is likely necessary anyways.
2020-05-05Extend style guideline documentationChristian Duerr
2020-03-07Fix selection with invisible start and endChristian Duerr
This resolves an issue with the selection clamping, where no selection would be rendered at all when the start was above the viewport while the end was below it.
2020-03-06Fix caching of variable font facesKirill Chibisov
2020-02-20Fix discarding of FreeType loading flagsKirill Chibisov
Fixes regression introduced in 6b327b6f8f0f308ff8f46cdf551ce0d0f3eda60b. Fixes #3355.
2020-01-31Fix handling of OpenType variable fontsKirill Chibisov
Fixes #3257.
2020-01-27Rework Fontconfig fallback to use cached list from font_sortKirill Chibisov
Previous implementation was querying Fontconfig using `charset` in a pattern, which was leading to unpredictable fallbacks in some cases, since Fontconfig was picking the font with the most coverage for a given charset, regardless of user configuration. Moreover all fallback was based on font_match which is extremely slow for such performance sensitive task as a fallback, so alacritty had a hard times on vtebench's unicode-random-write. The new approach is to use some internal fallback list from font_sort and iterate over it to get a proper fallback font, since it matches the following example query from `fc-match`: `fc-match -s "monospace:pixelsize=X:style=Y" That being said it's more intuitive for users to setup their system Fontconfig fallback, and also most applications are doing similar things. Moreover the new implementation uses internal caches over Fontconfig API when possible and performs font matches only once during load of requested font with font_sort, which leads to dramatically improved performance on already mentioned vtebench's unicode-random-write. Fixes #3176. Fixes #3134. Fixes #2657. Fixes #1560. Fixes #965. Fixes #511.
2020-01-15Update font crate to 2018 editionDavid Hewitt
2019-03-30Add rustfmt style guidev0.3.0-rc1Christian Duerr
2018-11-04Fix clippy issuesChristian Duerr
This resolves all existing clippy issues and removes some old `allow` annotations which aren't neccesary anymore.
2018-07-25Fix clippy lints and run font tests on travisMatthias Krüger
This fixes some existing clippy issues and runs the `font` tests through travis. Testing of copypasta crate was omitted due to problens when running on headless travis-ci environment (x11 clipboard would fail).
2018-07-01Fix clippy issuesChristian Duerr
2017-10-30config_subsitute(): fix typo by renaming to config_substitute()Martin Lindhe
2017-10-08FreeType rasterizer respects some fontconfigJoe Wilm
The FreeType rasterizer now reads settings like antialias, rgba, lcdfilter, and hintstyle and chooses FreeType settings accordingly. The result is that Alacritty fonts should look similar to the rest of the system.
2017-10-08Extend and improve FcPattern bindingsJoe Wilm
The fontconfig `FcPattern` type is wrapped as `fc::Pattern` and `fc::Pattern` ref. All methods for accessing data on the pattern now return an `Iterator`. This API turns out to be much more ergonomic than providing an integer index. We also override the default `nth` implementation of `Iterator` on these accessors to allow random (incremental only) access. For instance, accessing `family` attributes from a pattern: let families = pattern.family(); let second = pattern.nth(1); Or printing available styles for style in pattern.style() { println!("style={}", style); }
2017-10-08Organize fontconfig wrappersJoe Wilm
Each Fc type is split into a separate file. This organization will help as features are added to the bindings.