aboutsummaryrefslogtreecommitdiff
path: root/font/src/ft
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-16 22:48:04 -0800
committerJoe Wilm <joe@jwilm.com>2016-12-16 22:48:04 -0800
commitbde4dacc791501440515c1a51ad2fcb0256cf04c (patch)
tree66bd6762c4ae11705d1a82ed72112a408e5ec2d5 /font/src/ft
parent781572096ea67516a98872b1b3c5b1ffaea9bae0 (diff)
downloadalacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.tar.gz
alacritty-bde4dacc791501440515c1a51ad2fcb0256cf04c.zip
Misc formatting fixes
Diffstat (limited to 'font/src/ft')
-rw-r--r--font/src/ft/list_fonts.rs20
-rw-r--r--font/src/ft/mod.rs5
2 files changed, 21 insertions, 4 deletions
diff --git a/font/src/ft/list_fonts.rs b/font/src/ft/list_fonts.rs
index 1dc716d5..44794501 100644
--- a/font/src/ft/list_fonts.rs
+++ b/font/src/ft/list_fonts.rs
@@ -65,7 +65,11 @@ fn list_families() -> Vec<String> {
}
let mut id = 0;
- while FcPatternGetString(*font, b"family\0".as_ptr() as *mut c_char, id, &mut family) == FcResultMatch {
+ while FcPatternGetString(
+ *font,
+ b"family\0".as_ptr() as *mut c_char,
+ id, &mut family
+ ) == FcResultMatch {
let safe_family = fc_char8_to_string(family);
id += 1;
families.push(safe_family);
@@ -139,7 +143,11 @@ pub fn get_family_info(family: String) -> Family {
let family_name = family_name.as_ptr();
// Add family name to pattern. Use this for searching.
- FcPatternAddString(pattern, FAMILY.as_ptr() as *mut c_char, family_name as *mut FcChar8);
+ FcPatternAddString(
+ pattern,
+ FAMILY.as_ptr() as *mut c_char,
+ family_name as *mut FcChar8
+ );
// Request filename, style, and index for each variant in family
let object_set = FcObjectSetCreate(); // *mut FcObjectSet
@@ -147,7 +155,13 @@ pub fn get_family_info(family: String) -> Family {
FcObjectSetAdd(object_set, INDEX.as_ptr() as *mut c_char);
FcObjectSetAdd(object_set, STYLE.as_ptr() as *mut c_char);
- let variants = FcFontSetList(config, &mut font_set, 1 /* nsets */, pattern, object_set);
+ let variants = FcFontSetList(
+ config,
+ &mut font_set,
+ 1 /* nsets */,
+ pattern, object_set
+ );
+
let num_variant = (*variants).nfont as isize;
for i in 0..num_variant {
diff --git a/font/src/ft/mod.rs b/font/src/ft/mod.rs
index fa4325a0..c9abd693 100644
--- a/font/src/ft/mod.rs
+++ b/font/src/ft/mod.rs
@@ -117,7 +117,10 @@ impl Rasterizer {
unsafe {
let ft_lib = self.library.raw();
- freetype::ffi::FT_Library_SetLcdFilter(ft_lib, freetype::ffi::FT_LCD_FILTER_DEFAULT);
+ freetype::ffi::FT_Library_SetLcdFilter(
+ ft_lib,
+ freetype::ffi::FT_LCD_FILTER_DEFAULT
+ );
}
let bitmap = glyph.bitmap();