mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
gfx: Simplify OSX font template bytes accessor.
This commit is contained in:
parent
6264268c82
commit
39e082af18
1 changed files with 2 additions and 3 deletions
|
@ -81,9 +81,8 @@ impl FontTemplateData {
|
||||||
/// operation (depending on the platform) which performs synchronous disk I/O
|
/// operation (depending on the platform) which performs synchronous disk I/O
|
||||||
/// and should never be done lightly.
|
/// and should never be done lightly.
|
||||||
pub fn bytes(&self) -> Vec<u8> {
|
pub fn bytes(&self) -> Vec<u8> {
|
||||||
match self.bytes_if_in_memory() {
|
if let Some(font_data) = self.bytes_if_in_memory() {
|
||||||
Some(font_data) => return font_data,
|
return font_data;
|
||||||
None => {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = ServoUrl::parse(&*self.ctfont(0.0)
|
let path = ServoUrl::parse(&*self.ctfont(0.0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue