Open Bug 972161 Opened 6 years ago Updated 6 years ago

Fix font recording when using freetype fonts

Categories

(Core :: Graphics, defect)

x86_64
Linux
defect
Not set

Tracking

()

ASSIGNED

People

(Reporter: bas.schouten, Assigned: bas.schouten)

Details

Attachments

(1 file)

We need to properly record font data for FreeType fonts.
Attachment #8375281 - Flags: review?(jmuizelaar)
Comment on attachment 8375281 [details] [diff] [review]
Record font data freetype fonts

Review of attachment 8375281 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/2d/ScaledFontBase.cpp
@@ +220,5 @@
> +	cairo_ft_scaled_font_unlock_face(mScaledFont);
> +	return false;
> +      }
> + 
> +      FT_ULong length = 0;

// get the length of the whole font

@@ +228,5 @@
> +	gfxWarning() << "Failed to get font file from Freetype font. " << error;
> +	return false;
> +      }
> +      
> +      std::vector<FT_Byte> buffer(length);

// get the data

@@ +244,5 @@
> +  }
> +#endif
> +  
> +  return false;
> +}

This function could use some whitespace cleanup (Take a look at the review pane)
Attachment #8375281 - Flags: review?(jmuizelaar) → review+
You need to log in before you can comment on or make changes to this bug.