mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Convert internal font code to store pt size as Au.
This commit is contained in:
parent
cf789e40c5
commit
8331cfe089
6 changed files with 24 additions and 23 deletions
|
@ -164,7 +164,7 @@ impl Shaper {
|
|||
let hb_font: *mut hb_font_t = hb_font_create(hb_face);
|
||||
|
||||
// Set points-per-em. if zero, performs no hinting in that direction.
|
||||
let pt_size = font.actual_pt_size;
|
||||
let pt_size = font.actual_pt_size.to_subpx();
|
||||
hb_font_set_ppem(hb_font, pt_size as c_uint, pt_size as c_uint);
|
||||
|
||||
// Set scaling. Note that this takes 16.16 fixed point.
|
||||
|
|
|
@ -17,7 +17,7 @@ use platform::font_template::FontTemplateData;
|
|||
pub struct TextRun {
|
||||
pub text: Arc<String>,
|
||||
pub font_template: Arc<FontTemplateData>,
|
||||
pub actual_pt_size: f64,
|
||||
pub actual_pt_size: Au,
|
||||
pub font_metrics: FontMetrics,
|
||||
/// The glyph runs that make up this text run.
|
||||
pub glyphs: Arc<Vec<GlyphRun>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue