aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/font_context.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-12-05 22:13:50 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-12-06 02:35:10 +0100
commitaf879523eabbdb72b672aab50da1f83bb782ed1e (patch)
tree4071fb814c411a6c2fd52192d0994bd4861af94d /components/gfx/font_context.rs
parent37cd870a9e41fe6e6ba12e0622f2e2a935fda89a (diff)
downloadservo-af879523eabbdb72b672aab50da1f83bb782ed1e.tar.gz
servo-af879523eabbdb72b672aab50da1f83bb782ed1e.zip
style: Make all keywords CamelCase for consistency.
This prevents confusion and paves the ground for derive(Parse) of them.
Diffstat (limited to 'components/gfx/font_context.rs')
-rw-r--r--components/gfx/font_context.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs
index 13c3d777579..d95318b8fde 100644
--- a/components/gfx/font_context.rs
+++ b/components/gfx/font_context.rs
@@ -20,7 +20,8 @@ use std::hash::{BuildHasherDefault, Hash, Hasher};
use std::rc::Rc;
use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
-use style::computed_values::{font_style, font_variant_caps};
+use style::computed_values::font_style::T as FontStyle;
+use style::computed_values::font_variant_caps::T as FontVariantCaps;
use style::properties::style_structs;
use webrender_api;
@@ -78,14 +79,14 @@ impl FontContext {
template: Arc<FontTemplateData>,
descriptor: FontTemplateDescriptor,
pt_size: Au,
- variant: font_variant_caps::T,
+ variant: FontVariantCaps,
font_key: webrender_api::FontKey) -> Result<Font, ()> {
// TODO: (Bug #3463): Currently we only support fake small-caps
// painting. We should also support true small-caps (where the
// font supports it) in the future.
let actual_pt_size = match variant {
- font_variant_caps::T::small_caps => pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR),
- font_variant_caps::T::normal => pt_size,
+ FontVariantCaps::SmallCaps => pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR),
+ FontVariantCaps::Normal => pt_size,
};
let handle = FontHandle::new_from_template(&self.platform_handle,
@@ -130,8 +131,8 @@ impl FontContext {
let desc = FontTemplateDescriptor::new(style.font_weight,
style.font_stretch,
- style.font_style == font_style::T::italic ||
- style.font_style == font_style::T::oblique);
+ style.font_style == FontStyle::Italic ||
+ style.font_style == FontStyle::Oblique);
let mut fonts: SmallVec<[Rc<RefCell<Font>>; 8]> = SmallVec::new();