mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Turn on synthetic small-caps for layout 2020 (#31435)
Synthetic small caps is supported by the font subsystem, but this is disabled in Layout 2020. We can turn this on to bring support to parity with the old layout system. In addition to turning on synthetic small-caps this change also improves the way that they work. Before, synthetic small caps meant that every character was a small version of capitalized character. After this change, capital letters are larger than small caps versions of small letters -- matching other browsers and the common expectation of how small caps works.
This commit is contained in:
parent
98bd306816
commit
5ba29c20ac
48 changed files with 214 additions and 176 deletions
|
@ -31,7 +31,7 @@ pub struct TextRun {
|
|||
/// The UTF-8 string represented by this text run.
|
||||
pub text: Arc<String>,
|
||||
pub font_template: Arc<FontTemplateData>,
|
||||
pub actual_pt_size: Au,
|
||||
pub pt_size: Au,
|
||||
pub font_metrics: FontMetrics,
|
||||
pub font_key: FontInstanceKey,
|
||||
/// The glyph runs that make up this text run.
|
||||
|
@ -195,7 +195,7 @@ impl<'a> TextRun {
|
|||
font_metrics: font.metrics.clone(),
|
||||
font_template: font.handle.template(),
|
||||
font_key: font.font_key,
|
||||
actual_pt_size: font.actual_pt_size,
|
||||
pt_size: font.descriptor.pt_size,
|
||||
glyphs: Arc::new(glyphs),
|
||||
bidi_level: bidi_level,
|
||||
extra_word_spacing: Au(0),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue