Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Webrender #21725

Merged
merged 4 commits into from Oct 12, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Fix windows build errors.

  • Loading branch information
jdm committed Oct 12, 2018
commit 4e5b3bcf15988088fd8d86e4aad9c04b7a863c41
@@ -9,13 +9,15 @@
use app_units::Au;
use dwrote;
use dwrote::{Font, FontFace, FontFile};
use dwrote::{FontWeight, FontStretch, FontStyle};
use dwrote::{FontStretch, FontStyle};
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel};
use platform::font_template::FontTemplateData;
use platform::windows::font_context::FontContextHandle;
use platform::windows::font_list::font_from_atom;
use servo_atoms::Atom;
use std::fmt;
use std::ops::Deref;
use std::sync::Arc;
use style::computed_values::font_stretch::T as StyleFontStretch;
use style::computed_values::font_weight::T as StyleFontWeight;
@@ -238,14 +240,29 @@ impl FontInfo {
#[derive(Debug)]
pub struct FontHandle {
font_data: Arc<FontTemplateData>,
face: FontFace,
face: Nondebug<FontFace>,
info: FontInfo,
em_size: f32,
du_per_em: f32,
du_to_px: f32,
scaled_du_to_px: f32,
}

struct Nondebug<T>(T);

impl<T> fmt::Debug for Nondebug<T> {
fn fmt(&self, _f: &mut fmt::Formatter) -> fmt::Result {
Ok(())
}
}

impl<T> Deref for Nondebug<T> {
type Target = T;
fn deref(&self) -> &T {
&self.0
}
}

impl FontHandle {}

impl FontHandleMethods for FontHandle {
@@ -284,7 +301,7 @@ impl FontHandleMethods for FontHandle {

Ok(FontHandle {
font_data: template.clone(),
face: face,
face: Nondebug(face),
info: info,
em_size: em_size,
du_per_em: du_per_em,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.