Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FontTemplateDescriptor under FreeType #19928

Merged
merged 2 commits into from Feb 8, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Fix missing whitespace between functions

  • Loading branch information
jonleighton committed Feb 3, 2018
commit e9b93985d57d68ff7a0d7c079b4fee6b04334f3b
@@ -113,14 +113,17 @@ impl FontHandleMethods for FontHandle {
}
}
}

fn template(&self) -> Arc<FontTemplateData> {
self.font_data.clone()
}

fn family_name(&self) -> String {
unsafe {
c_str_to_string((*self.face).family_name as *const c_char)
}
}

fn face_name(&self) -> Option<String> {
unsafe {
let name = FT_Get_Postscript_Name(self.face) as *const c_char;
@@ -132,9 +135,11 @@ impl FontHandleMethods for FontHandle {
}
}
}

fn is_italic(&self) -> bool {
unsafe { (*self.face).style_flags & FT_STYLE_FLAG_ITALIC as c_long != 0 }
}

fn boldness(&self) -> FontWeight {
let default_weight = FontWeight::normal();
if unsafe { (*self.face).style_flags & FT_STYLE_FLAG_BOLD as c_long == 0 } {
@@ -158,6 +163,7 @@ impl FontHandleMethods for FontHandle {
}
}
}

fn stretchiness(&self) -> FontStretch {
// TODO(pcwalton): Implement this.
FontStretch::Normal
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.