mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #7468 - JoshTheGoldfish:Issue7460, r=jdm
Making test-tidy check that = have space after them For issue #7460. Need to ensure compatibility with #7390. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7468) <!-- Reviewable:end -->
This commit is contained in:
commit
15de679f11
23 changed files with 127 additions and 111 deletions
|
@ -101,13 +101,13 @@ pub struct Font {
|
|||
|
||||
bitflags! {
|
||||
flags ShapingFlags: u8 {
|
||||
#[doc="Set if the text is entirely whitespace."]
|
||||
#[doc = "Set if the text is entirely whitespace."]
|
||||
const IS_WHITESPACE_SHAPING_FLAG = 0x01,
|
||||
#[doc="Set if we are to ignore ligatures."]
|
||||
#[doc = "Set if we are to ignore ligatures."]
|
||||
const IGNORE_LIGATURES_SHAPING_FLAG = 0x02,
|
||||
#[doc="Set if we are to disable kerning."]
|
||||
#[doc = "Set if we are to disable kerning."]
|
||||
const DISABLE_KERNING_SHAPING_FLAG = 0x04,
|
||||
#[doc="Text direction is right-to-left."]
|
||||
#[doc = "Text direction is right-to-left."]
|
||||
const RTL_FLAG = 0x08,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,16 +31,16 @@ use std::sync::Arc;
|
|||
use azure::azure_hl::BackendType;
|
||||
use azure::scaled_font::ScaledFont;
|
||||
|
||||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
use azure::scaled_font::FontInfo;
|
||||
|
||||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
|
||||
ScaledFont::new(BackendType::Skia, FontInfo::FontData(&template.bytes),
|
||||
pt_size.to_f32_px())
|
||||
}
|
||||
|
||||
#[cfg(target_os="macos")]
|
||||
#[cfg(target_os = "macos")]
|
||||
fn create_scaled_font(template: &Arc<FontTemplateData>, pt_size: Au) -> ScaledFont {
|
||||
let cgfont = template.ctfont().as_ref().unwrap().copy_to_CGFont();
|
||||
ScaledFont::new(BackendType::Skia, &cgfont, pt_size.to_f32_px())
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#![feature(arc_weak)]
|
||||
#![cfg_attr(any(target_os="linux", target_os = "android"), feature(box_raw))]
|
||||
#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(box_raw))]
|
||||
#![feature(box_syntax)]
|
||||
#![feature(custom_attribute)]
|
||||
#![feature(custom_derive)]
|
||||
#![feature(hashmap_hasher)]
|
||||
#![cfg_attr(any(target_os="linux", target_os = "android"), feature(heap_api))]
|
||||
#![cfg_attr(any(target_os = "linux", target_os = "android"), feature(heap_api))]
|
||||
#![feature(mpsc_select)]
|
||||
#![feature(plugin)]
|
||||
#![feature(str_char)]
|
||||
|
@ -55,23 +55,23 @@ extern crate canvas_traits;
|
|||
extern crate harfbuzz;
|
||||
|
||||
// Linux and Android-specific library dependencies
|
||||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
extern crate fontconfig;
|
||||
|
||||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
extern crate freetype;
|
||||
|
||||
// Mac OS-specific library dependencies
|
||||
#[cfg(target_os="macos")] extern crate core_foundation;
|
||||
#[cfg(target_os="macos")] extern crate core_graphics;
|
||||
#[cfg(target_os="macos")] extern crate core_text;
|
||||
#[cfg(target_os = "macos")] extern crate core_foundation;
|
||||
#[cfg(target_os = "macos")] extern crate core_graphics;
|
||||
#[cfg(target_os = "macos")] extern crate core_text;
|
||||
|
||||
pub use paint_context::PaintContext;
|
||||
|
||||
// Private painting modules
|
||||
mod paint_context;
|
||||
|
||||
#[path="display_list/mod.rs"]
|
||||
#[path = "display_list/mod.rs"]
|
||||
pub mod display_list;
|
||||
pub mod paint_task;
|
||||
|
||||
|
@ -85,7 +85,7 @@ pub mod font_template;
|
|||
mod filters;
|
||||
|
||||
// Platform-specific implementations.
|
||||
#[path="platform/mod.rs"]
|
||||
#[path = "platform/mod.rs"]
|
||||
pub mod platform;
|
||||
|
||||
// Text
|
||||
|
|
|
@ -139,7 +139,7 @@ pub fn get_system_default_family(generic_name: &str) -> Option<String> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os="linux")]
|
||||
#[cfg(target_os = "linux")]
|
||||
pub fn get_last_resort_font_families() -> Vec<String> {
|
||||
vec!(
|
||||
"Fira Sans".to_owned(),
|
||||
|
@ -148,7 +148,7 @@ pub fn get_last_resort_font_families() -> Vec<String> {
|
|||
)
|
||||
}
|
||||
|
||||
#[cfg(target_os="android")]
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn get_last_resort_font_families() -> Vec<String> {
|
||||
vec!("Roboto".to_owned())
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub use platform::freetype::{font, font_context, font_list, font_template};
|
||||
|
||||
#[cfg(target_os="macos")]
|
||||
#[cfg(target_os = "macos")]
|
||||
pub use platform::macos::{font, font_context, font_list, font_template};
|
||||
|
||||
#[cfg(any(target_os="linux", target_os = "android"))]
|
||||
#[cfg(any(target_os = "linux", target_os = "android"))]
|
||||
pub mod freetype {
|
||||
pub mod font;
|
||||
pub mod font_context;
|
||||
|
@ -16,7 +16,7 @@ pub mod freetype {
|
|||
pub mod font_template;
|
||||
}
|
||||
|
||||
#[cfg(target_os="macos")]
|
||||
#[cfg(target_os = "macos")]
|
||||
pub mod macos {
|
||||
pub mod font;
|
||||
pub mod font_context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue