mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
Issue #3039 - Extend cairo API with an explicit font_get_hint_metrics function.
This extension allows us to get font hint metrics without having to create and destroy cairo font options structs. Since this is used in loops, this will improve performance, especially in documents which have many text segments.
This commit is contained in:
parent
be7e9c26bb
commit
517a6b90a3
5 changed files with 26 additions and 4 deletions
|
|
@ -591,11 +591,8 @@ gfxFontShaper::GetRoundOffsetsToPixels(DrawTarget* aDrawTarget,
|
|||
}
|
||||
|
||||
// Sometimes hint metrics gets set for us, most notably for printing.
|
||||
cairo_font_options_t *font_options = cairo_font_options_create();
|
||||
cairo_scaled_font_get_font_options(scaled_font, font_options);
|
||||
cairo_hint_metrics_t hint_metrics =
|
||||
cairo_font_options_get_hint_metrics(font_options);
|
||||
cairo_font_options_destroy(font_options);
|
||||
cairo_scaled_font_get_hint_metrics(scaled_font);
|
||||
|
||||
switch (hint_metrics) {
|
||||
case CAIRO_HINT_METRICS_OFF:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue