mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Rename gfx
to fonts
(#32556)
This crate only takes care of fonts now as graphics related things are split into other crates. In addition, this exposes data structures at the top of the crate, hiding the implementation details and making it simpler to import them. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
9f8118abc7
commit
cd2ab36759
159 changed files with 224 additions and 266 deletions
|
@ -6,11 +6,11 @@ use std::mem;
|
|||
use std::ops::Range;
|
||||
|
||||
use app_units::Au;
|
||||
use gfx::font::{FontRef, ShapingFlags, ShapingOptions};
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context::FontContext;
|
||||
use gfx::text::glyph::GlyphRun;
|
||||
use gfx_traits::ByteIndex;
|
||||
use fonts::{
|
||||
FontCacheThread, FontContext, FontRef, GlyphRun, ShapingFlags, ShapingOptions,
|
||||
LAST_RESORT_GLYPH_ADVANCE,
|
||||
};
|
||||
use fonts_traits::ByteIndex;
|
||||
use log::warn;
|
||||
use range::Range as ServoRange;
|
||||
use serde::Serialize;
|
||||
|
@ -371,7 +371,7 @@ impl TextRun {
|
|||
let space_width = font
|
||||
.glyph_index(' ')
|
||||
.map(|glyph_id| font.glyph_h_advance(glyph_id))
|
||||
.unwrap_or(gfx::font::LAST_RESORT_GLYPH_ADVANCE);
|
||||
.unwrap_or(LAST_RESORT_GLYPH_ADVANCE);
|
||||
specified_word_spacing.to_used_value(Au::from_f64_px(space_width))
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue