mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01: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
|
@ -21,8 +21,8 @@ canvas_traits = { workspace = true }
|
|||
embedder_traits = { workspace = true }
|
||||
euclid = { workspace = true }
|
||||
fnv = { workspace = true }
|
||||
gfx = { path = "../gfx" }
|
||||
gfx_traits = { workspace = true }
|
||||
fonts = { path = "../fonts" }
|
||||
fonts_traits = { workspace = true }
|
||||
html5ever = { workspace = true }
|
||||
ipc-channel = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
|
|
|
@ -11,8 +11,7 @@ use std::thread;
|
|||
|
||||
use base::id::PipelineId;
|
||||
use fnv::FnvHasher;
|
||||
use gfx::font_cache_thread::FontCacheThread;
|
||||
use gfx::font_context::FontContext;
|
||||
use fonts::{FontCacheThread, FontContext};
|
||||
use net_traits::image_cache::{
|
||||
ImageCache, ImageCacheResult, ImageOrMetadataAvailable, UsePlaceholder,
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ use embedder_traits::Cursor;
|
|||
use euclid::default::{Point2D, Rect, SideOffsets2D as UntypedSideOffsets2D, Size2D};
|
||||
use euclid::{rect, SideOffsets2D};
|
||||
use fnv::FnvHashMap;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use fonts::ByteIndex;
|
||||
use ipc_channel::ipc;
|
||||
use log::{debug, warn};
|
||||
use net_traits::image_cache::UsePlaceholder;
|
||||
|
|
|
@ -16,7 +16,7 @@ use base::text::is_bidi_control;
|
|||
use bitflags::bitflags;
|
||||
use canvas_traits::canvas::{CanvasId, CanvasMsg};
|
||||
use euclid::default::{Point2D, Rect, Size2D, Vector2D};
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use fonts::ByteIndex;
|
||||
use html5ever::{local_name, namespace_url, ns};
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use log::debug;
|
||||
|
|
|
@ -11,7 +11,7 @@ use app_units::{Au, MIN_AU};
|
|||
use base::print_tree::PrintTree;
|
||||
use bitflags::bitflags;
|
||||
use euclid::default::{Point2D, Rect, Size2D};
|
||||
use gfx::font::FontMetrics;
|
||||
use fonts::FontMetrics;
|
||||
use log::debug;
|
||||
use range::{int_range_index, Range, RangeIndex};
|
||||
use script_layout_interface::wrapper_traits::PseudoElementType;
|
||||
|
|
|
@ -10,9 +10,10 @@ use std::sync::Arc;
|
|||
|
||||
use app_units::Au;
|
||||
use base::text::is_bidi_control;
|
||||
use gfx::font::{self, FontMetrics, FontRef, RunMetrics, ShapingFlags, ShapingOptions};
|
||||
use gfx::font_cache_thread::FontIdentifier;
|
||||
use gfx::text::glyph::ByteIndex;
|
||||
use fonts::{
|
||||
self, ByteIndex, FontIdentifier, FontMetrics, FontRef, RunMetrics, ShapingFlags,
|
||||
ShapingOptions, LAST_RESORT_GLYPH_ADVANCE,
|
||||
};
|
||||
use log::{debug, warn};
|
||||
use range::Range;
|
||||
use style::computed_values::text_rendering::T as TextRendering;
|
||||
|
@ -211,7 +212,7 @@ impl TextRunScanner {
|
|||
font.glyph_index(' ')
|
||||
.map(|glyph_id| font.glyph_h_advance(glyph_id))
|
||||
})
|
||||
.unwrap_or(font::LAST_RESORT_GLYPH_ADVANCE);
|
||||
.unwrap_or(LAST_RESORT_GLYPH_ADVANCE);
|
||||
inherited_text_style
|
||||
.word_spacing
|
||||
.to_used_value(Au::from_f64_px(space_width))
|
||||
|
|
|
@ -8,8 +8,9 @@ use std::slice::Iter;
|
|||
use std::sync::Arc;
|
||||
|
||||
use app_units::Au;
|
||||
use gfx::font::{FontMetrics, FontRef, RunMetrics, ShapingFlags, ShapingOptions};
|
||||
use gfx::text::glyph::{ByteIndex, GlyphRun, GlyphStore};
|
||||
use fonts::{
|
||||
ByteIndex, FontMetrics, FontRef, GlyphRun, GlyphStore, RunMetrics, ShapingFlags, ShapingOptions,
|
||||
};
|
||||
use log::debug;
|
||||
use range::Range;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue