More even text kerning (#7431)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
parent
e5d0b93633
commit
d5b0a6f446
|
|
@ -4,9 +4,9 @@ version = 4
|
|||
|
||||
[[package]]
|
||||
name = "ab_glyph"
|
||||
version = "0.2.29"
|
||||
version = "0.2.31"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec3672c180e71eeaaac3a541fbbc5f5ad4def8b747c595ad30d674e43049f7b0"
|
||||
checksum = "e074464580a518d16a7126262fffaaa47af89d4099d4cb403f8ed938ba12ee7d"
|
||||
dependencies = [
|
||||
"ab_glyph_rasterizer",
|
||||
"owned_ttf_parser",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ pub trait AtomExt<'a> {
|
|||
{
|
||||
let font_selection = FontSelection::default();
|
||||
let font_id = font_selection.resolve(ui.style());
|
||||
let height = ui.fonts(|f| f.row_height(&font_id));
|
||||
let height = ui.fonts_mut(|f| f.row_height(&font_id));
|
||||
self.atom_max_height(height)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -476,7 +476,7 @@ impl Window<'_> {
|
|||
let (title_bar_height_with_margin, title_content_spacing) = if with_title_bar {
|
||||
let style = ctx.style();
|
||||
let title_bar_inner_height = ctx
|
||||
.fonts(|fonts| title.font_height(fonts, &style))
|
||||
.fonts_mut(|fonts| title.font_height(fonts, &style))
|
||||
.at_least(style.spacing.interact_size.y);
|
||||
let title_bar_inner_height = title_bar_inner_height + window_frame.inner_margin.sum().y;
|
||||
let half_height = (title_bar_inner_height / 2.0).round() as _;
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
|
||||
use std::{borrow::Cow, cell::RefCell, panic::Location, sync::Arc, time::Duration};
|
||||
|
||||
use emath::{GuiRounding as _, OrderedFloat};
|
||||
use emath::GuiRounding as _;
|
||||
use epaint::{
|
||||
ClippedPrimitive, ClippedShape, Color32, ImageData, ImageDelta, Pos2, Rect, StrokeKind,
|
||||
TessellationOptions, TextureAtlas, TextureId, Vec2,
|
||||
ClippedPrimitive, ClippedShape, Color32, ImageData, Pos2, Rect, StrokeKind,
|
||||
TessellationOptions, TextureId, Vec2,
|
||||
emath::{self, TSTransform},
|
||||
mutex::RwLock,
|
||||
stats::PaintStats,
|
||||
tessellator,
|
||||
text::{FontInsert, FontPriority, Fonts},
|
||||
text::{FontInsert, FontPriority, Fonts, FontsView},
|
||||
vec2,
|
||||
};
|
||||
|
||||
|
|
@ -406,12 +406,7 @@ impl ViewportRepaintInfo {
|
|||
|
||||
#[derive(Default)]
|
||||
struct ContextImpl {
|
||||
/// Since we could have multiple viewports across multiple monitors with
|
||||
/// different `pixels_per_point`, we need a `Fonts` instance for each unique
|
||||
/// `pixels_per_point`.
|
||||
/// This is because the `Fonts` depend on `pixels_per_point` for the font atlas
|
||||
/// as well as kerning, font sizes, etc.
|
||||
fonts: std::collections::BTreeMap<OrderedFloat<f32>, Fonts>,
|
||||
fonts: Option<Fonts>,
|
||||
font_definitions: FontDefinitions,
|
||||
|
||||
memory: Memory,
|
||||
|
|
@ -575,12 +570,11 @@ impl ContextImpl {
|
|||
fn update_fonts_mut(&mut self) {
|
||||
profiling::function_scope!();
|
||||
let input = &self.viewport().input;
|
||||
let pixels_per_point = input.pixels_per_point();
|
||||
let max_texture_side = input.max_texture_side;
|
||||
|
||||
if let Some(font_definitions) = self.memory.new_font_definitions.take() {
|
||||
// New font definition loaded, so we need to reload all fonts.
|
||||
self.fonts.clear();
|
||||
self.fonts = None;
|
||||
self.font_definitions = font_definitions;
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!("Loading new font definitions");
|
||||
|
|
@ -589,7 +583,7 @@ impl ContextImpl {
|
|||
if !self.memory.add_fonts.is_empty() {
|
||||
let fonts = self.memory.add_fonts.drain(..);
|
||||
for font in fonts {
|
||||
self.fonts.clear(); // recreate all the fonts
|
||||
self.fonts = None; // recreate all the fonts
|
||||
for family in font.families {
|
||||
let fam = self
|
||||
.font_definitions
|
||||
|
|
@ -614,26 +608,22 @@ impl ContextImpl {
|
|||
|
||||
let mut is_new = false;
|
||||
|
||||
let fonts = self
|
||||
.fonts
|
||||
.entry(pixels_per_point.into())
|
||||
.or_insert_with(|| {
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!("Creating new Fonts for pixels_per_point={pixels_per_point}");
|
||||
let fonts = self.fonts.get_or_insert_with(|| {
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!("Creating new Fonts");
|
||||
|
||||
is_new = true;
|
||||
profiling::scope!("Fonts::new");
|
||||
Fonts::new(
|
||||
pixels_per_point,
|
||||
max_texture_side,
|
||||
text_alpha_from_coverage,
|
||||
self.font_definitions.clone(),
|
||||
)
|
||||
});
|
||||
is_new = true;
|
||||
profiling::scope!("Fonts::new");
|
||||
Fonts::new(
|
||||
max_texture_side,
|
||||
text_alpha_from_coverage,
|
||||
self.font_definitions.clone(),
|
||||
)
|
||||
});
|
||||
|
||||
{
|
||||
profiling::scope!("Fonts::begin_pass");
|
||||
fonts.begin_pass(pixels_per_point, max_texture_side, text_alpha_from_coverage);
|
||||
fonts.begin_pass(max_texture_side, text_alpha_from_coverage);
|
||||
}
|
||||
|
||||
if is_new && self.memory.options.preload_font_glyphs {
|
||||
|
|
@ -641,7 +631,10 @@ impl ContextImpl {
|
|||
// Preload the most common characters for the most common fonts.
|
||||
// This is not very important to do, but may save a few GPU operations.
|
||||
for font_id in self.memory.options.style().text_styles.values() {
|
||||
fonts.lock().fonts.font(font_id).preload_common_characters();
|
||||
fonts
|
||||
.fonts
|
||||
.font(&font_id.family)
|
||||
.preload_common_characters();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1049,13 +1042,32 @@ impl Context {
|
|||
/// Not valid until first call to [`Context::run()`].
|
||||
/// That's because since we don't know the proper `pixels_per_point` until then.
|
||||
#[inline]
|
||||
pub fn fonts<R>(&self, reader: impl FnOnce(&Fonts) -> R) -> R {
|
||||
pub fn fonts<R>(&self, reader: impl FnOnce(&FontsView<'_>) -> R) -> R {
|
||||
self.write(move |ctx| {
|
||||
let pixels_per_point = ctx.pixels_per_point();
|
||||
reader(
|
||||
ctx.fonts
|
||||
.get(&pixels_per_point.into())
|
||||
.expect("No fonts available until first call to Context::run()"),
|
||||
&ctx.fonts
|
||||
.as_mut()
|
||||
.expect("No fonts available until first call to Context::run()")
|
||||
.with_pixels_per_point(pixels_per_point),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
/// Read-write access to [`Fonts`].
|
||||
///
|
||||
/// Not valid until first call to [`Context::run()`].
|
||||
/// That's because since we don't know the proper `pixels_per_point` until then.
|
||||
#[inline]
|
||||
pub fn fonts_mut<R>(&self, reader: impl FnOnce(&mut FontsView<'_>) -> R) -> R {
|
||||
self.write(move |ctx| {
|
||||
let pixels_per_point = ctx.pixels_per_point();
|
||||
reader(
|
||||
&mut ctx
|
||||
.fonts
|
||||
.as_mut()
|
||||
.expect("No fonts available until first call to Context::run()")
|
||||
.with_pixels_per_point(pixels_per_point),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
@ -1568,9 +1580,8 @@ impl Context {
|
|||
} = ModifierNames::SYMBOLS;
|
||||
|
||||
let font_id = TextStyle::Body.resolve(&self.style());
|
||||
self.fonts(|f| {
|
||||
let mut lock = f.lock();
|
||||
let font = lock.fonts.font(&font_id);
|
||||
self.fonts_mut(|f| {
|
||||
let mut font = f.fonts.font(&font_id.family);
|
||||
font.has_glyphs(alt)
|
||||
&& font.has_glyphs(ctrl)
|
||||
&& font.has_glyphs(shift)
|
||||
|
|
@ -1920,14 +1931,12 @@ impl Context {
|
|||
pub fn set_fonts(&self, font_definitions: FontDefinitions) {
|
||||
profiling::function_scope!();
|
||||
|
||||
let pixels_per_point = self.pixels_per_point();
|
||||
|
||||
let mut update_fonts = true;
|
||||
|
||||
self.read(|ctx| {
|
||||
if let Some(current_fonts) = ctx.fonts.get(&pixels_per_point.into()) {
|
||||
if let Some(current_fonts) = ctx.fonts.as_ref() {
|
||||
// NOTE: this comparison is expensive since it checks TTF data for equality
|
||||
if current_fonts.lock().fonts.definitions() == &font_definitions {
|
||||
if current_fonts.definitions() == &font_definitions {
|
||||
update_fonts = false; // no need to update
|
||||
}
|
||||
}
|
||||
|
|
@ -1948,15 +1957,11 @@ impl Context {
|
|||
pub fn add_font(&self, new_font: FontInsert) {
|
||||
profiling::function_scope!();
|
||||
|
||||
let pixels_per_point = self.pixels_per_point();
|
||||
|
||||
let mut update_fonts = true;
|
||||
|
||||
self.read(|ctx| {
|
||||
if let Some(current_fonts) = ctx.fonts.get(&pixels_per_point.into()) {
|
||||
if let Some(current_fonts) = ctx.fonts.as_ref() {
|
||||
if current_fonts
|
||||
.lock()
|
||||
.fonts
|
||||
.definitions()
|
||||
.font_data
|
||||
.contains_key(&new_font.name)
|
||||
|
|
@ -2449,30 +2454,12 @@ impl ContextImpl {
|
|||
|
||||
self.memory.end_pass(&viewport.this_pass.used_ids);
|
||||
|
||||
if let Some(fonts) = self.fonts.get(&pixels_per_point.into()) {
|
||||
if let Some(fonts) = self.fonts.as_mut() {
|
||||
let tex_mngr = &mut self.tex_manager.0.write();
|
||||
if let Some(font_image_delta) = fonts.font_image_delta() {
|
||||
// A partial font atlas update, e.g. a new glyph has been entered.
|
||||
tex_mngr.set(TextureId::default(), font_image_delta);
|
||||
}
|
||||
|
||||
if 1 < self.fonts.len() {
|
||||
// We have multiple different `pixels_per_point`,
|
||||
// e.g. because we have many viewports spread across
|
||||
// monitors with different DPI scaling.
|
||||
// All viewports share the same texture namespace and renderer,
|
||||
// so the all use `TextureId::default()` for the font texture.
|
||||
// This is a problem.
|
||||
// We solve this with a hack: we always upload the full font atlas
|
||||
// every frame, for all viewports.
|
||||
// This ensures it is up-to-date, solving
|
||||
// https://github.com/emilk/egui/issues/3664
|
||||
// at the cost of a lot of performance.
|
||||
// (This will override any smaller delta that was uploaded above.)
|
||||
profiling::scope!("full_font_atlas_update");
|
||||
let full_delta = ImageDelta::full(fonts.image(), TextureAtlas::texture_options());
|
||||
tex_mngr.set(TextureId::default(), full_delta);
|
||||
}
|
||||
}
|
||||
|
||||
// Inform the backend of all textures that have been updated (including font atlas).
|
||||
|
|
@ -2615,24 +2602,6 @@ impl ContextImpl {
|
|||
self.memory.set_viewport_id(viewport_id);
|
||||
}
|
||||
|
||||
let active_pixels_per_point: std::collections::BTreeSet<OrderedFloat<f32>> = self
|
||||
.viewports
|
||||
.values()
|
||||
.map(|v| v.input.pixels_per_point.into())
|
||||
.collect();
|
||||
self.fonts.retain(|pixels_per_point, _| {
|
||||
if active_pixels_per_point.contains(pixels_per_point) {
|
||||
true
|
||||
} else {
|
||||
#[cfg(feature = "log")]
|
||||
log::trace!(
|
||||
"Freeing Fonts with pixels_per_point={} because it is no longer needed",
|
||||
pixels_per_point.into_inner()
|
||||
);
|
||||
false
|
||||
}
|
||||
});
|
||||
|
||||
platform_output.num_completed_passes += 1;
|
||||
|
||||
FullOutput {
|
||||
|
|
@ -2664,7 +2633,7 @@ impl Context {
|
|||
|
||||
self.write(|ctx| {
|
||||
let tessellation_options = ctx.memory.options.tessellation_options;
|
||||
let texture_atlas = if let Some(fonts) = ctx.fonts.get(&pixels_per_point.into()) {
|
||||
let texture_atlas = if let Some(fonts) = ctx.fonts.as_ref() {
|
||||
fonts.texture_atlas()
|
||||
} else {
|
||||
#[cfg(feature = "log")]
|
||||
|
|
@ -2673,13 +2642,8 @@ impl Context {
|
|||
.iter()
|
||||
.next()
|
||||
.expect("No fonts loaded")
|
||||
.1
|
||||
.texture_atlas()
|
||||
};
|
||||
let (font_tex_size, prepared_discs) = {
|
||||
let atlas = texture_atlas.lock();
|
||||
(atlas.size(), atlas.prepared_discs())
|
||||
};
|
||||
|
||||
let paint_stats = PaintStats::from_shapes(&shapes);
|
||||
let clipped_primitives = {
|
||||
|
|
@ -2687,8 +2651,8 @@ impl Context {
|
|||
tessellator::Tessellator::new(
|
||||
pixels_per_point,
|
||||
tessellation_options,
|
||||
font_tex_size,
|
||||
prepared_discs,
|
||||
texture_atlas.size(),
|
||||
texture_atlas.prepared_discs(),
|
||||
)
|
||||
.tessellate_shapes(shapes)
|
||||
};
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ impl State {
|
|||
{
|
||||
// Paint location to left of `pos`:
|
||||
let location_galley =
|
||||
ctx.fonts(|f| f.layout(location, font_id.clone(), color, f32::INFINITY));
|
||||
ctx.fonts_mut(|f| f.layout(location, font_id.clone(), color, f32::INFINITY));
|
||||
let location_rect =
|
||||
Align2::RIGHT_TOP.anchor_size(pos - 4.0 * Vec2::X, location_galley.size());
|
||||
painter.galley(location_rect.min, location_galley, color);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||
use emath::GuiRounding as _;
|
||||
use epaint::{
|
||||
CircleShape, ClippedShape, CornerRadius, PathStroke, RectShape, Shape, Stroke, StrokeKind,
|
||||
text::{Fonts, Galley, LayoutJob},
|
||||
text::{FontsView, Galley, LayoutJob},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
|
@ -141,14 +141,22 @@ impl Painter {
|
|||
self.pixels_per_point
|
||||
}
|
||||
|
||||
/// Read-only access to the shared [`Fonts`].
|
||||
/// Read-only access to the shared [`FontsView`].
|
||||
///
|
||||
/// See [`Context`] documentation for how locks work.
|
||||
#[inline]
|
||||
pub fn fonts<R>(&self, reader: impl FnOnce(&Fonts) -> R) -> R {
|
||||
pub fn fonts<R>(&self, reader: impl FnOnce(&FontsView<'_>) -> R) -> R {
|
||||
self.ctx.fonts(reader)
|
||||
}
|
||||
|
||||
/// Read-write access to the shared [`FontsView`].
|
||||
///
|
||||
/// See [`Context`] documentation for how locks work.
|
||||
#[inline]
|
||||
pub fn fonts_mut<R>(&self, reader: impl FnOnce(&mut FontsView<'_>) -> R) -> R {
|
||||
self.ctx.fonts_mut(reader)
|
||||
}
|
||||
|
||||
/// Where we paint
|
||||
#[inline]
|
||||
pub fn layer_id(&self) -> LayerId {
|
||||
|
|
@ -525,7 +533,7 @@ impl Painter {
|
|||
color: crate::Color32,
|
||||
wrap_width: f32,
|
||||
) -> Arc<Galley> {
|
||||
self.fonts(|f| f.layout(text, font_id, color, wrap_width))
|
||||
self.fonts_mut(|f| f.layout(text, font_id, color, wrap_width))
|
||||
}
|
||||
|
||||
/// Will line break at `\n`.
|
||||
|
|
@ -539,7 +547,7 @@ impl Painter {
|
|||
font_id: FontId,
|
||||
color: crate::Color32,
|
||||
) -> Arc<Galley> {
|
||||
self.fonts(|f| f.layout(text, font_id, color, f32::INFINITY))
|
||||
self.fonts_mut(|f| f.layout(text, font_id, color, f32::INFINITY))
|
||||
}
|
||||
|
||||
/// Lay out this text layut job in a galley.
|
||||
|
|
@ -548,7 +556,7 @@ impl Painter {
|
|||
#[inline]
|
||||
#[must_use]
|
||||
pub fn layout_job(&self, layout_job: LayoutJob) -> Arc<Galley> {
|
||||
self.fonts(|f| f.layout_job(layout_job))
|
||||
self.fonts_mut(|f| f.layout_job(layout_job))
|
||||
}
|
||||
|
||||
/// Paint text that has already been laid out in a [`Galley`].
|
||||
|
|
|
|||
|
|
@ -2790,7 +2790,6 @@ impl Widget for &mut FontTweak {
|
|||
scale,
|
||||
y_offset_factor,
|
||||
y_offset,
|
||||
baseline_offset_factor,
|
||||
} = self;
|
||||
|
||||
ui.label("Scale");
|
||||
|
|
@ -2806,10 +2805,6 @@ impl Widget for &mut FontTweak {
|
|||
ui.add(DragValue::new(y_offset).speed(-0.02));
|
||||
ui.end_row();
|
||||
|
||||
ui.label("baseline_offset_factor");
|
||||
ui.add(DragValue::new(baseline_offset_factor).speed(-0.0025));
|
||||
ui.end_row();
|
||||
|
||||
if ui.button("Reset").clicked() {
|
||||
*self = Default::default();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
use emath::GuiRounding as _;
|
||||
use epaint::mutex::RwLock;
|
||||
use epaint::text::FontsView;
|
||||
use std::{any::Any, hash::Hash, sync::Arc};
|
||||
|
||||
use crate::ClosableTag;
|
||||
|
|
@ -16,9 +17,7 @@ use crate::{
|
|||
WidgetRect, WidgetText,
|
||||
containers::{CollapsingHeader, CollapsingResponse, Frame},
|
||||
ecolor::Hsva,
|
||||
emath, epaint,
|
||||
epaint::text::Fonts,
|
||||
grid,
|
||||
emath, epaint, grid,
|
||||
layout::{Direction, Layout},
|
||||
pass_state,
|
||||
placer::Placer,
|
||||
|
|
@ -735,7 +734,7 @@ impl Ui {
|
|||
///
|
||||
/// Returns a value rounded to [`emath::GUI_ROUNDING`].
|
||||
pub fn text_style_height(&self, style: &TextStyle) -> f32 {
|
||||
self.fonts(|f| f.row_height(&style.resolve(self.style())))
|
||||
self.fonts_mut(|f| f.row_height(&style.resolve(self.style())))
|
||||
}
|
||||
|
||||
/// Screen-space rectangle for clipping what we paint in this ui.
|
||||
|
|
@ -847,11 +846,17 @@ impl Ui {
|
|||
self.ctx().output_mut(writer)
|
||||
}
|
||||
|
||||
/// Read-only access to [`Fonts`].
|
||||
/// Read-only access to [`FontsView`].
|
||||
#[inline]
|
||||
pub fn fonts<R>(&self, reader: impl FnOnce(&Fonts) -> R) -> R {
|
||||
pub fn fonts<R>(&self, reader: impl FnOnce(&FontsView<'_>) -> R) -> R {
|
||||
self.ctx().fonts(reader)
|
||||
}
|
||||
|
||||
/// Read-write access to [`FontsView`].
|
||||
#[inline]
|
||||
pub fn fonts_mut<R>(&self, reader: impl FnOnce(&mut FontsView<'_>) -> R) -> R {
|
||||
self.ctx().fonts_mut(reader)
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ impl RichText {
|
|||
/// Read the font height of the selected text style.
|
||||
///
|
||||
/// Returns a value rounded to [`emath::GUI_ROUNDING`].
|
||||
pub fn font_height(&self, fonts: &epaint::Fonts, style: &Style) -> f32 {
|
||||
pub fn font_height(&self, fonts: &mut epaint::FontsView<'_>, style: &Style) -> f32 {
|
||||
let mut font_id = self.text_style.as_ref().map_or_else(
|
||||
|| FontSelection::Default.resolve(style),
|
||||
|text_style| text_style.resolve(style),
|
||||
|
|
@ -676,7 +676,7 @@ impl WidgetText {
|
|||
}
|
||||
|
||||
/// Returns a value rounded to [`emath::GUI_ROUNDING`].
|
||||
pub(crate) fn font_height(&self, fonts: &epaint::Fonts, style: &Style) -> f32 {
|
||||
pub(crate) fn font_height(&self, fonts: &mut epaint::FontsView<'_>, style: &Style) -> f32 {
|
||||
match self {
|
||||
Self::Text(_) => fonts.row_height(&FontSelection::Default.resolve(style)),
|
||||
Self::RichText(text) => text.font_height(fonts, style),
|
||||
|
|
@ -762,7 +762,7 @@ impl WidgetText {
|
|||
},
|
||||
);
|
||||
layout_job.wrap = text_wrapping;
|
||||
ctx.fonts(|f| f.layout_job(layout_job))
|
||||
ctx.fonts_mut(|f| f.layout_job(layout_job))
|
||||
}
|
||||
Self::RichText(text) => {
|
||||
let mut layout_job = Arc::unwrap_or_clone(text).into_layout_job(
|
||||
|
|
@ -771,12 +771,12 @@ impl WidgetText {
|
|||
default_valign,
|
||||
);
|
||||
layout_job.wrap = text_wrapping;
|
||||
ctx.fonts(|f| f.layout_job(layout_job))
|
||||
ctx.fonts_mut(|f| f.layout_job(layout_job))
|
||||
}
|
||||
Self::LayoutJob(job) => {
|
||||
let mut job = Arc::unwrap_or_clone(job);
|
||||
job.wrap = text_wrapping;
|
||||
ctx.fonts(|f| f.layout_job(job))
|
||||
ctx.fonts_mut(|f| f.layout_job(job))
|
||||
}
|
||||
Self::Galley(galley) => galley,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ impl Label {
|
|||
if let Some(first_section) = layout_job.sections.first_mut() {
|
||||
first_section.leading_space = first_row_indentation;
|
||||
}
|
||||
let galley = ui.fonts(|fonts| fonts.layout_job(layout_job));
|
||||
let galley = ui.fonts_mut(|fonts| fonts.layout_job(layout_job));
|
||||
|
||||
let pos = pos2(ui.max_rect().left(), ui.cursor().top());
|
||||
assert!(!galley.rows.is_empty(), "Galleys are never empty");
|
||||
|
|
@ -252,7 +252,7 @@ impl Label {
|
|||
layout_job.justify = ui.layout().horizontal_justify();
|
||||
}
|
||||
|
||||
let galley = ui.fonts(|fonts| fonts.layout_job(layout_job));
|
||||
let galley = ui.fonts_mut(|fonts| fonts.layout_job(layout_job));
|
||||
let (rect, mut response) = ui.allocate_exact_size(galley.size(), sense);
|
||||
response.intrinsic_size = Some(galley.intrinsic_size());
|
||||
let galley_pos = match galley.job.halign {
|
||||
|
|
|
|||
|
|
@ -266,7 +266,7 @@ impl<'t> TextEdit<'t> {
|
|||
/// let mut layouter = |ui: &egui::Ui, buf: &dyn egui::TextBuffer, wrap_width: f32| {
|
||||
/// let mut layout_job: egui::text::LayoutJob = my_memoized_highlighter(buf.as_str());
|
||||
/// layout_job.wrap.max_width = wrap_width;
|
||||
/// ui.fonts(|f| f.layout_job(layout_job))
|
||||
/// ui.fonts_mut(|f| f.layout_job(layout_job))
|
||||
/// };
|
||||
/// ui.add(egui::TextEdit::multiline(&mut my_code).layouter(&mut layouter));
|
||||
/// # });
|
||||
|
|
@ -504,7 +504,7 @@ impl TextEdit<'_> {
|
|||
let hint_text_str = hint_text.text().to_owned();
|
||||
|
||||
let font_id = font_selection.resolve(ui.style());
|
||||
let row_height = ui.fonts(|f| f.row_height(&font_id));
|
||||
let row_height = ui.fonts_mut(|f| f.row_height(&font_id));
|
||||
const MIN_WIDTH: f32 = 24.0; // Never make a [`TextEdit`] more narrow than this.
|
||||
let available_width = (ui.available_width() - margin.sum().x).at_least(MIN_WIDTH);
|
||||
let desired_width = desired_width.unwrap_or_else(|| ui.spacing().text_edit_width);
|
||||
|
|
@ -522,7 +522,7 @@ impl TextEdit<'_> {
|
|||
} else {
|
||||
LayoutJob::simple_singleline(text, font_id_clone.clone(), text_color)
|
||||
};
|
||||
ui.fonts(|f| f.layout_job(layout_job))
|
||||
ui.fonts_mut(|f| f.layout_job(layout_job))
|
||||
};
|
||||
|
||||
let layouter = layouter.unwrap_or(&mut default_layouter);
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ impl ColoredText {
|
|||
pub fn ui(&self, ui: &mut egui::Ui) {
|
||||
let mut job = self.0.clone();
|
||||
job.wrap.max_width = ui.available_width();
|
||||
let galley = ui.fonts(|f| f.layout_job(job));
|
||||
let galley = ui.fonts_mut(|f| f.layout_job(job));
|
||||
ui.add(egui::Label::new(galley).selectable(true));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ impl FrameHistory {
|
|||
));
|
||||
let cpu_usage = to_screen.inverse().transform_pos(pointer_pos).y;
|
||||
let text = format!("{:.1} ms", 1e3 * cpu_usage);
|
||||
shapes.push(ui.fonts(|f| {
|
||||
shapes.push(ui.fonts_mut(|f| {
|
||||
Shape::text(
|
||||
f,
|
||||
pos2(rect.left(), y),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:991cd41c5c9c4e42d8408259a1f276c56470665ee924082405217a83f630c536
|
||||
size 334990
|
||||
oid sha256:c9a4ac7d3f959100ae760e32b1fa35ba5bbaa0dd3b3d25472cd9c311430e766e
|
||||
size 335270
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:187da3058c8311292b9fa3387cb0f059a4449ac982ab3a93743427bd7ed602f2
|
||||
size 92380
|
||||
oid sha256:2c4f0263b6ab61b9b589f6cb7b83ed020e0131bea88a7d2db24a8b2dff026f69
|
||||
size 93090
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fc3dbdcd483d4da7a9c1a00f0245a7882997fbcd2d26f8d6a6d2d855f3382063
|
||||
size 179724
|
||||
oid sha256:3ee4ef83971dc7df940326444723bc9ebd57378476686085d68574c35d3d6513
|
||||
size 182173
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8ad2c2d494e2287b878049091688069e4d86b69ae72b89cb7ecbe47d8c35e33
|
||||
size 100766
|
||||
oid sha256:47792205570445b5fc3a64ffbc6a4804c7b23b074af90ed1baca691f73f96963
|
||||
size 102366
|
||||
|
|
|
|||
|
|
@ -165,14 +165,12 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
|||
let wrap_width = 512.0;
|
||||
let font_id = egui::FontId::default();
|
||||
let text_color = egui::Color32::WHITE;
|
||||
let fonts = egui::epaint::text::Fonts::new(
|
||||
pixels_per_point,
|
||||
let mut fonts = egui::epaint::text::Fonts::new(
|
||||
max_texture_side,
|
||||
egui::epaint::AlphaFromCoverage::default(),
|
||||
egui::FontDefinitions::default(),
|
||||
);
|
||||
{
|
||||
let mut locked_fonts = fonts.lock();
|
||||
c.bench_function("text_layout_uncached", |b| {
|
||||
b.iter(|| {
|
||||
use egui::epaint::text::{LayoutJob, layout};
|
||||
|
|
@ -183,13 +181,13 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
|||
text_color,
|
||||
wrap_width,
|
||||
);
|
||||
layout(&mut locked_fonts.fonts, job.into())
|
||||
layout(&mut fonts.fonts, pixels_per_point, job.into())
|
||||
});
|
||||
});
|
||||
}
|
||||
c.bench_function("text_layout_cached", |b| {
|
||||
b.iter(|| {
|
||||
fonts.layout(
|
||||
fonts.with_pixels_per_point(pixels_per_point).layout(
|
||||
LOREM_IPSUM_LONG.to_owned(),
|
||||
font_id.clone(),
|
||||
text_color,
|
||||
|
|
@ -211,24 +209,30 @@ pub fn criterion_benchmark(c: &mut Criterion) {
|
|||
|
||||
let mut rng = rand::rng();
|
||||
b.iter(|| {
|
||||
fonts.begin_pass(
|
||||
pixels_per_point,
|
||||
max_texture_side,
|
||||
egui::epaint::AlphaFromCoverage::default(),
|
||||
);
|
||||
fonts.begin_pass(max_texture_side, egui::epaint::AlphaFromCoverage::default());
|
||||
|
||||
// Delete a random character, simulating a user making an edit in a long file:
|
||||
let mut new_string = string.clone();
|
||||
let idx = rng.random_range(0..string.len());
|
||||
new_string.remove(idx);
|
||||
|
||||
fonts.layout(new_string, font_id.clone(), text_color, wrap_width);
|
||||
fonts.with_pixels_per_point(pixels_per_point).layout(
|
||||
new_string,
|
||||
font_id.clone(),
|
||||
text_color,
|
||||
wrap_width,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
let galley = fonts.layout(LOREM_IPSUM_LONG.to_owned(), font_id, text_color, wrap_width);
|
||||
let galley = fonts.with_pixels_per_point(pixels_per_point).layout(
|
||||
LOREM_IPSUM_LONG.to_owned(),
|
||||
font_id,
|
||||
text_color,
|
||||
wrap_width,
|
||||
);
|
||||
let font_image_size = fonts.font_image_size();
|
||||
let prepared_discs = fonts.texture_atlas().lock().prepared_discs();
|
||||
let prepared_discs = fonts.texture_atlas().prepared_discs();
|
||||
let mut tessellator = egui::epaint::Tessellator::new(
|
||||
1.0,
|
||||
Default::default(),
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ impl crate::View for CodeEditor {
|
|||
language,
|
||||
);
|
||||
layout_job.wrap.max_width = wrap_width;
|
||||
ui.fonts(|f| f.layout_job(layout_job))
|
||||
ui.fonts_mut(|f| f.layout_job(layout_job))
|
||||
};
|
||||
|
||||
egui::ScrollArea::vertical().show(ui, |ui| {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ impl CodeExample {
|
|||
|
||||
ui.horizontal(|ui| {
|
||||
let font_id = egui::TextStyle::Monospace.resolve(ui.style());
|
||||
let indentation = 2.0 * 4.0 * ui.fonts(|f| f.glyph_width(&font_id, ' '));
|
||||
let indentation = 2.0 * 4.0 * ui.fonts_mut(|f| f.glyph_width(&font_id, ' '));
|
||||
ui.add_space(indentation);
|
||||
|
||||
egui::Grid::new("code_samples")
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ impl crate::View for FontBook {
|
|||
let available_glyphs = self
|
||||
.available_glyphs
|
||||
.entry(self.font_id.family.clone())
|
||||
.or_insert_with(|| available_characters(ui, self.font_id.family.clone()));
|
||||
.or_insert_with(|| available_characters(ui, &self.font_id.family));
|
||||
|
||||
ui.separator();
|
||||
|
||||
|
|
@ -140,11 +140,10 @@ fn char_info_ui(ui: &mut egui::Ui, chr: char, glyph_info: &GlyphInfo, font_id: e
|
|||
});
|
||||
}
|
||||
|
||||
fn available_characters(ui: &egui::Ui, family: egui::FontFamily) -> BTreeMap<char, GlyphInfo> {
|
||||
ui.fonts(|f| {
|
||||
f.lock()
|
||||
.fonts
|
||||
.font(&egui::FontId::new(10.0, family)) // size is arbitrary for getting the characters
|
||||
fn available_characters(ui: &egui::Ui, family: &egui::FontFamily) -> BTreeMap<char, GlyphInfo> {
|
||||
ui.fonts_mut(|f| {
|
||||
f.fonts
|
||||
.font(family)
|
||||
.characters()
|
||||
.iter()
|
||||
.filter(|(chr, _fonts)| !chr.is_whitespace() && !chr.is_ascii_control())
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ fn label_ui(ui: &mut egui::Ui) {
|
|||
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
// Trick so we don't have to add spaces in the text below:
|
||||
let width = ui.fonts(|f|f.glyph_width(&TextStyle::Body.resolve(ui.style()), ' '));
|
||||
let width = ui.fonts_mut(|f|f.glyph_width(&TextStyle::Body.resolve(ui.style()), ' '));
|
||||
ui.spacing_mut().item_spacing.x = width;
|
||||
|
||||
ui.label(RichText::new("Text can have").color(Color32::from_rgb(110, 255, 110)));
|
||||
|
|
@ -792,7 +792,7 @@ impl TextRotation {
|
|||
|
||||
let start_pos = self.size / 2.0;
|
||||
|
||||
let s = ui.ctx().fonts(|f| {
|
||||
let s = ui.ctx().fonts_mut(|f| {
|
||||
let mut t = egui::Shape::text(
|
||||
f,
|
||||
rect.min + start_pos,
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ fn huge_content_painter(ui: &mut egui::Ui) {
|
|||
ui.add_space(4.0);
|
||||
|
||||
let font_id = TextStyle::Body.resolve(ui.style());
|
||||
let row_height = ui.fonts(|f| f.row_height(&font_id)) + ui.spacing().item_spacing.y;
|
||||
let row_height = ui.fonts_mut(|f| f.row_height(&font_id)) + ui.spacing().item_spacing.y;
|
||||
let num_rows = 10_000;
|
||||
|
||||
ScrollArea::vertical()
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ impl EasyMarkEditor {
|
|||
let mut layouter = |ui: &egui::Ui, easymark: &dyn TextBuffer, wrap_width: f32| {
|
||||
let mut layout_job = highlighter.highlight(ui.style(), easymark.as_str());
|
||||
layout_job.wrap.max_width = wrap_width;
|
||||
ui.fonts(|f| f.layout_job(layout_job))
|
||||
ui.fonts_mut(|f| f.layout_job(layout_job))
|
||||
};
|
||||
|
||||
ui.add(
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ fn bullet_point(ui: &mut Ui, width: f32) -> Response {
|
|||
|
||||
fn numbered_point(ui: &mut Ui, width: f32, number: &str) -> Response {
|
||||
let font_id = TextStyle::Body.resolve(ui.style());
|
||||
let row_height = ui.fonts(|f| f.row_height(&font_id));
|
||||
let row_height = ui.fonts_mut(|f| f.row_height(&font_id));
|
||||
let (rect, response) = ui.allocate_exact_size(vec2(width, row_height), Sense::hover());
|
||||
let text = format!("{number}.");
|
||||
let text_color = ui.visuals().strong_text_color();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:13262df01a7f2cd5655b8b0bb9379ae02a851c877314375f047a7d749908125c
|
||||
size 31368
|
||||
oid sha256:514f2d25acec42f1a7baf40716549fe233f61a19cca675165d53f99b2433bb76
|
||||
size 31669
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:27d5aa7b7e6bd5f59c1765e98ca4588545284456e4cc255799ea797950e09850
|
||||
size 26461
|
||||
oid sha256:693d26c8195ef8062d81127290a1e2e252b317f6430aba8cabf1f1c8b25a3213
|
||||
size 26895
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b768086b0f79d76f08b21ef315ad5333ae81aa5b592dfbf47535b40d10cc19bc
|
||||
size 26422
|
||||
oid sha256:d55b12672145f5a1b3fd7d8f063735dcce06d1e6dc6fa06af93d7d04c0460ab9
|
||||
size 26928
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d36b7a37d8fcb727a015475f98b54552b37339e1087d0a1af3fd0fefe9a8b9cf
|
||||
size 78742
|
||||
oid sha256:1054c1cb66803f36119e8e698f69dfaf1583167a8eba6316915a21c7303dc22c
|
||||
size 78324
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3c03eadbd3ba486100303ab9b350d82d5ba31b7aa694641538e8b347a1bc18b0
|
||||
size 61400
|
||||
oid sha256:4d43b44d4ae5c168762c74b3c34f9ae5a57b63ff3470dfc272a69625b57c8710
|
||||
size 62921
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a63cee05ac47fdf52ae3a1398f7e230a29ffdfd62ac63f3acc74cedba9100069
|
||||
size 25840
|
||||
oid sha256:d6a7ac851b248bfe69f486ccaf12063ccc7e73fb01b4e7d07902677b5db6118b
|
||||
size 25946
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1e3e0330de3f68593329d2f36649127d5ac70109232c68f5c7ce310fa919fda5
|
||||
size 20348
|
||||
oid sha256:8e37b5c785cd011dbbade5975147702fe7d458c22699c83e307033339f614c26
|
||||
size 20797
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2882a9842f51a7c3e9642a9a3d260407e1194648f47574608822a293bd3b1d56
|
||||
size 10465
|
||||
oid sha256:24e31eeaf1b7c07fb1ddb3aa92a876595436c20fa54937cf35c44fb7a7a6d890
|
||||
size 10774
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1e4ba53720713a8083997acb990fe4fc68ba4b9ffc7a4e58f17faa66de0da091
|
||||
size 128261
|
||||
oid sha256:a1c130d0a2cacc4fcc55d9c6947ce239a68cada8c207a03a04b08e822adb9cd5
|
||||
size 127038
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:08deb70e760326a1274ebcbd51849aae958ace52ec1aab36fff93a9b8dd98f4d
|
||||
size 24029
|
||||
oid sha256:294f03e8961a96705ca219da37555a4c856849ac2e8cea73bca29948e68526c6
|
||||
size 24505
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:828ee860ed31930d67deb2b6efee8bf2aec3c3266cf05b5510d1565dc7090e2f
|
||||
size 99106
|
||||
oid sha256:d5bb6d587903f3bd06ed8e3410ba8f31aa88fe355adb36023e4949bf89c009b4
|
||||
size 101649
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:403321533e97eac1aaf994d0ddeb5d53f06070a4b6a5c913c0ba22a3c60ad761
|
||||
size 17604
|
||||
oid sha256:12aa0ce4cd746cffc9fafc1daa43342df7b251f92a7e330be44b1b73e671c9f7
|
||||
size 18142
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e3978a1dd2479bab2f234411b49d414fa3cf43ae18025db570f3c7a84f4a16e7
|
||||
size 111696
|
||||
oid sha256:cc2575366c79922f95a7b40766b6a5a91fdac7bce49c1eb057d992679d11030f
|
||||
size 115934
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c6e29013cf12bd663cd7243baad03585c8d5b95d592f96aa8d7910abf5dcc2db
|
||||
size 24541
|
||||
oid sha256:a7b1f709a5e8be577dbdd6122935dc1969fbe355155b78b00b862be2bdb268d1
|
||||
size 24876
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8071d1a913ed35c4edab01dcce28996ee1c365ca393e11fd3f99cef65c7736ec
|
||||
size 50357
|
||||
oid sha256:b3201768ee61eb87aba5fac21b3382b160296acd3a0d7caab62360efe63cd94d
|
||||
size 51714
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:641e5c7d4deccc8eb0374db4707dc356285a5c72186f9021d0d601c22bc5115f
|
||||
size 21894
|
||||
oid sha256:28112d906a73833fb6052402df4717a17fd374ab7c3a5f84348463e025689b58
|
||||
size 22255
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6cefcd7aa537e98e3a560fc458028f7e6b4f67e92343b94771f3ba21dce0298c
|
||||
size 46666
|
||||
oid sha256:8b485f4dd8b72fa6b8c689b4091a0660afd4f1301287382c44c16c3bb4fc5e0c
|
||||
size 47315
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9ff7b37547644d542e7fe3486954479d0e28ee30be37f7c938b820192eddcfb9
|
||||
size 24078
|
||||
oid sha256:90d78b13159965cdaac9c67aa54a11390c0a18a0fdcee7f818edd06f87fa865f
|
||||
size 24313
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5211f7be04c3c28555cc3b53c798c165854441e9847d9bf7d67ad6b2fb0e72cc
|
||||
size 64618
|
||||
oid sha256:c672c2ad3c33863a09b35e00fcd761ba91488d194273788c9790ac475d20e33c
|
||||
size 66212
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2f467edf4a84c8a98d96f168d843edb201ad2ee067dcd9d8d9ea214a02a41b1f
|
||||
size 32182
|
||||
oid sha256:0d12e4f2fbfebc8ba3050f317e98f2a485ec7961db9190104143257499d206ac
|
||||
size 32700
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:99c68d8904a48205bbf02eb134715d289881be5b868949dbd22602f2a35a1d47
|
||||
size 35718
|
||||
oid sha256:a80efaa91120ab8b830037073b5c177045261da2a8f146c859bc76317a6a3b1a
|
||||
size 36328
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f8d3c5c2032c8eb36f60b2422eb8dd257b7b6417b1d93b120b3347e37a047c74
|
||||
size 17447
|
||||
oid sha256:a654b9ebd75fb1fea733378ffcd50876dae406610ef070c3aa487db0a5f48eb1
|
||||
size 17625
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:376657d119ace8d96b52bbf0e9daf379f8e0d5ee6a1be840b3efc210a02b6364
|
||||
size 277816
|
||||
oid sha256:c91f592571ba654d0a96791662ae7530a1db4c1630b57c795d1c006ea6e46f19
|
||||
size 256975
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:88cebf1a05400c967f8930271eb3f6a983fe82e9afa266682a2bd3862e2ab62f
|
||||
size 57055
|
||||
oid sha256:87df1de1677b993bdaaf0c0f13db1e0c9a52bdf91cbdc8c4487357e09cbfc453
|
||||
size 56985
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:22515363a812443b65cbe9060e2352e18eed04dc382fc993c33bd8a4b5ddff91
|
||||
size 24817
|
||||
oid sha256:a11b0aeb8b8a7ff3acd54b99869af03cd04cc2edf13afc713ce924c52d39262d
|
||||
size 24826
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:aabc0e3821a2d9b21708e9b8d9be02ad55055ccabe719a93af921dba2384b4b3
|
||||
size 34297
|
||||
oid sha256:b17c6044a9975a871da3062a5e1f55e500ebd4b0c325ee8c1d9277d8f7ba24e3
|
||||
size 35158
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:15d023fcd551cbf7b643bae2591751e075fdcd8ef9386e5ab28ac2cd99c0efee
|
||||
size 23230
|
||||
oid sha256:165b7029b921d3c4a2ad7164eaf288efc3e5f022341dc89ea214f50890072c49
|
||||
size 23385
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:059238da7f4eebf6f33da593ee5e756a710d1ea1c19ebab4494dd0f9362e822f
|
||||
size 179995
|
||||
oid sha256:45a5e9542b928cf1624d84f6bf8e339dc78e02adb4d90ae83fad914941319631
|
||||
size 186697
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:599ecaca9a324200096e445992de027fb9e9a93d56fc5cb918777aa306d20f58
|
||||
size 115446
|
||||
oid sha256:d96d6f381aa5e2ac87ee8a7a3fcf1d07a98532642ba5d45e3c24a5c331bafd96
|
||||
size 119551
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c8a0b214ec1cc325b88918f25da87bfdb469cbcc6bf6646a0ac0a1d5f21a26e6
|
||||
size 25614
|
||||
oid sha256:b97435e619f0655d6332ed1f779af6b93c65b5264b09e7f05242db0b196c8c27
|
||||
size 26019
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9b51b334db17a29df66e010c06d6cb3599013b569c068cf55b9603ed40c03eae
|
||||
size 75313
|
||||
oid sha256:a834ebd9c0e66b4e4e60d5dd02274624005e368ae4c9b6f0a34feef51ecd6648
|
||||
size 76635
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a3f8873c9cfb80ddeb1ccc0fa04c1c84ea936db1685238f5d29ee6e89f55e457
|
||||
size 68814
|
||||
oid sha256:a77520c0176ff60c506174998fa6e0cc9473103e93efb05858f52c82fe1b3852
|
||||
size 69473
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1f74f765e6f187a9cf8f3ff254b1fa5826d0c2719ef904560d56aebae7526fa7
|
||||
size 64799
|
||||
oid sha256:beeb28e1e1d25281ad69736be3aae98ae6ca20c16873be5596f2e608894536b8
|
||||
size 66019
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e82ae562cf2c987624667cd9324e21726411802c2a901fe36d9f9e4e61c6b980
|
||||
size 20968
|
||||
oid sha256:806b43782ee228900ecb9c7b1fb7b57a8894669db1475a13852215f64d18b2c5
|
||||
size 21352
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a328a035ebf0dd10b935902e8e17a8fce7455f2dcf21c90f44e44ce9e99c2677
|
||||
size 62318
|
||||
oid sha256:3b70081c1423731d387df294f5685c56d265b6b66dfd95e606624665d45d3766
|
||||
size 64463
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0bcca7b25740375f882acd6707b360092a78f96a1b7c807b5c22904a9c8efbd8
|
||||
size 12872
|
||||
oid sha256:1a837402657274b1a31e757005cb1fb0f5b345f9d3427be700357b982455baec
|
||||
size 13081
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:288d8c2a5aa14fb1b9a7bb6dbc098c7cfbe5bb5391baf6566785d824affb9396
|
||||
size 35306
|
||||
oid sha256:fda993429a2454cf84ae9cc73ae4242aa50a80a5fd8920dc35601bf8442e9669
|
||||
size 36020
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b8c3dd4dd971ad19d6695f063779f0a25c9b4ad4a15d4e5e080ac5d832605d95
|
||||
size 42521
|
||||
oid sha256:c8ee6b7e3e4c4d3dd96b1b7f6111a9e032e2ee96c157ff7d669332d15b23129d
|
||||
size 43557
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b1ef1ed7d902b72fac55a83865cff451c04c8ef230096a4dc420a699936334a
|
||||
size 47540
|
||||
oid sha256:702842a12c11f131bf41ad49542369b0aa520bf2ec89e460c069177c48e630b4
|
||||
size 48301
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:630041fbea61422695bb52fb3d5b00ad877cb0a55cdc264d3d6c665e7d2339a7
|
||||
size 47502
|
||||
oid sha256:ab58d458abb369d4925e6ca614cdfd5f87171de5def5daa23f0fa002af8c7b18
|
||||
size 48229
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9c831bbc1f4f52e0b1d2868af3e5632717b2fd8df196b507151dcafc61ddbd45
|
||||
size 43772
|
||||
oid sha256:a89afce6dbbc27ebac9989be3219d96aac4f51f09dea0c10c9a13e3e6e5b7d54
|
||||
size 44194
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7b5ecf62a1a4edbecb65948796695084d3ac82d6bdf6b80a5f09241e76987f64
|
||||
size 43676
|
||||
oid sha256:331d86036fea0271cda3969de4c59650df90c1d6442d61f99200fa699d5b9d74
|
||||
size 44318
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:39bd11647241521c0ad5c7163a1af4f1aa86792018657091a2d47bb7f2c48b47
|
||||
size 598408
|
||||
oid sha256:89326fda609fdd4b6ce6aa5cd0881d2a720ee498c7283670085fb4116738117d
|
||||
size 619548
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:080a59163ab60d60738cfab5afac7cfbddfb585d8a0ee7d03540924b458badea
|
||||
size 833822
|
||||
oid sha256:fde14e4bb03251a7ff4ba508e3c78eb33204781dc67dec440f93a146d74f6691
|
||||
size 813974
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:216d3d028f48f4bfbd6aca0a25500655d4eb4d5581a387397ed0b048d57fc0c3
|
||||
size 984737
|
||||
oid sha256:d5c95515a85e1bb827ff5507843c30d39864fdf0578890ce788889578ae65724
|
||||
size 992333
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:399fc3d64e7ff637425effe6c80d684be1cf8bb9b555458352d0ae6c62bddb5a
|
||||
size 1109505
|
||||
oid sha256:53423e41be4856056639d14aca6695966465d8ed0379a97deeb101aa41ff560b
|
||||
size 1129280
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30ce4874a1adb8acf8c8e404f3e19e683eca3133cdef15befbc50d6c09618094
|
||||
size 1241773
|
||||
oid sha256:56ec1367a030b816a01b5580f454d1a2138cc4dc1fd2534526743b33fd4d1be9
|
||||
size 1239055
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:135fbe5f4ee485ee671931b64c16410b9073d40bedb23dc2545fc863448e8c63
|
||||
size 1398091
|
||||
oid sha256:3d9ab25243e4850888e43b268801963d8fafb68aa27e0a7cfc1f4b563c8326e8
|
||||
size 1410062
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1b0fe7aa33506c59142aff764c6b229e8c55b35c8038312b22ea2659987a081a
|
||||
size 45578
|
||||
oid sha256:ec6720a0b4d1db5ddcd08e4ee9834b56b9d0bded7d7e7194865f804d74bb76b2
|
||||
size 46251
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3a3512ea7235640db79e86aa84039621784270201c9213c910f15e7451e5600b
|
||||
size 87336
|
||||
oid sha256:234f2b50e096f1f1545531edeb5a7865e0a73e2035967ce3270602512c3a9a18
|
||||
size 88006
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dc4918a534f26b72d42ef20221e26c0f91a0252870a1987c1fe4cc4aa3c74872
|
||||
size 119406
|
||||
oid sha256:d4611a5844cb85a000ec1fb7b51b6a75ba8ada24da108d962b16b0317e55fa7f
|
||||
size 120119
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:71182570a65693839fd7cd7390025731ab3f3f88ab55bc67d8be6466fe5a2c11
|
||||
size 51843
|
||||
oid sha256:e6fcca95ef83f8fd57359ac3bb52aa2bb338a726845fbe0370c41e59b99f15d3
|
||||
size 52535
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a0dc0294f990730da34fcbbc53f44280306ec6179826c20a6c9ee946e1148b61
|
||||
size 55042
|
||||
oid sha256:c15f24d4b9a969b7dc275a3402e2fc36a1b86f3bfaf4f43b8c3e7ae36634e70e
|
||||
size 55729
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3004adfe5a864bdc768ceb42d1f09b6debcaf5413f8fea4d36b0aff99e4584f9
|
||||
size 55511
|
||||
oid sha256:58bbd42732e48c1792765dc0c48d57ef0e4441a8b4e97eed936d564bef661116
|
||||
size 56210
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b99360833f59a212a965a13d52485ab8ad0e6420b9288b2d6936507067c22a85
|
||||
size 36395
|
||||
oid sha256:8546adf43506733e48e3c8988f7e869bffb2a674629dc9d66e52a5aae0123653
|
||||
size 37132
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:82aa004f668f0ac6b493717b4bff8436ccc1e991c7fb3fcde5b5f3a123c06b9f
|
||||
size 36428
|
||||
oid sha256:aff779555f23d9360f58f1b7dc2686c72b848cc5d0a889ba4d5446fc4b252d65
|
||||
size 37112
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7e21bb01ae6e4226402a97b7086b49604cdde6b41a6770199df68dc940cd9a45
|
||||
size 64748
|
||||
oid sha256:7ad3e3de6e1c12eccd12750c44f52e863f28c3234cbc4f3091674e8c03a9d503
|
||||
size 66162
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0626bc45888ad250bf4b49c7f7f462a93ab91e3a2817fd7d0902411043c97132
|
||||
size 153289
|
||||
oid sha256:e9208c3b89665e8aab19ab5e7b427ed8251381c92c3b7c51a708f80c61be28b2
|
||||
size 152614
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:919a82c95468300bcd09471eb31d53d25d50cdcb02c27ddbc759d24e65da92b6
|
||||
size 59398
|
||||
oid sha256:b55a25a1ccff076036b574c82a923d13ff353c2f7a4927f2d911d04121782c05
|
||||
size 60492
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a55e39a640b0e2cc992286a86dcf38460f1abcc7b964df9022549ca1a94c4df5
|
||||
size 146408
|
||||
oid sha256:ae7992752e2fce96d0083143f07f216d27472ee057995ac2630cecccfeb44bcc
|
||||
size 146455
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bab1f08160bc43410b9d49ebfaae8a471309e670fccd31456a09176513361e6e
|
||||
size 4417
|
||||
oid sha256:9e42d26fa8188790c1dfed8e6a1a9f36a01b066a798dd1c878eeb3f0d1fb7e52
|
||||
size 4475
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b3a4ea95569b812ea46bc706f91d5ac03fa18ef1707a726b729422e9e9b18680
|
||||
size 7305
|
||||
oid sha256:03564030d1ce4d1698b2e831df405d88d3930de2894ff2b601adf1723c160383
|
||||
size 7443
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c618906fe1ff781c20cb89747879fa1ac63a115c624a2695adb9eb6ae157cd40
|
||||
size 2095
|
||||
oid sha256:668999dda2ce857c5a43dd7bdaf88d2062105683f2628b7f41b8885c423693df
|
||||
size 2136
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:29074de792c3c266b451ed28c940d7278d533570efecf5a64ae8bbae2b851a52
|
||||
size 10533
|
||||
oid sha256:d62d6e8eb73acaaa4851268f33ca6a9411f5c96eeaae5795bb5f71af4f8e31ba
|
||||
size 10819
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a12bfee8b9c6b6845ff3cadc40bdb707375f2177095fcd7f0b9ad1fcf1e9f00
|
||||
size 21118
|
||||
oid sha256:670b2c2887f3be0d808faca41195caebf227420034a725494bb5a07122f4cabe
|
||||
size 21881
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0e70f7ec229d94919346192141272273ff2f56032e1ae3137cc04ffd21aabe51
|
||||
size 28361
|
||||
oid sha256:52318e0106cc60d9442b2caa9d4cfa6b0831e9a85e2ed5415be67e9cdb113303
|
||||
size 29122
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d3295fc14054c31efd7a5c6508f52c4a80b0fb8f91a452808bcfe3e4dddecc9c
|
||||
size 32992
|
||||
oid sha256:10ac5ab3174646c2ec943c43ee954d7450f2d435f14b184bc824b858f1f036c2
|
||||
size 33901
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e2ef3a6fb7d43c85b0f8cdb0eb7a784aa7ae5af9b61ae296e0d1a41871eb2724
|
||||
size 19713
|
||||
oid sha256:89d172c28662826c8b0897a703730c629ca438755a14f040f029944d55f24353
|
||||
size 19966
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:730bdd28319b140433802740728f096adda749014a1629114b18d6f674ee4d86
|
||||
size 1893
|
||||
oid sha256:b17893705837c90f589b23b1e5b418e5ce93c5601c4abf348b8fc6ef416e4278
|
||||
size 1947
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b8c872f818a2e88cce35d015d16406c225ab6792cc6bfd232de94dbf2665df26
|
||||
size 2142
|
||||
oid sha256:b0b3a6fdd415cfae89d08fe0d10b0dab2327bba5f0fdb2032d3db271811313e6
|
||||
size 2182
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cdb0c0b955e3d3773a00afa61d4c44999de447aa71dd737181563101f09f5ac9
|
||||
size 5444
|
||||
oid sha256:dc85c7d6a9fe285ad27693169fd9a9fead0286637e3f77a349e573e660a13c47
|
||||
size 5697
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:70d76e55327de17163bc9c7e128c28153f95db3229dec919352a024eb80544f1
|
||||
size 7399
|
||||
oid sha256:dd0968233f5145a3708fe5ff771473abd824952e71182c2311670417c6a92f04
|
||||
size 7623
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b4b7b3145401b7cf9815a652a0914b230892ffda3b5e23fea530dafee9c0c3d3
|
||||
size 8110
|
||||
oid sha256:edc4149d67817420db2a2877a1eb83ad7569fd7aa8a4bf75a6dd93b2b59e9615
|
||||
size 8305
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:be6f0caa911d93543edb39ba6d07d7617ec283b37bc62622a68a18960eb840ab
|
||||
size 2871
|
||||
oid sha256:99ec3f7a81bbe351d0a894005fad95129f36d5c8cc29b4648ddfb9ddce201913
|
||||
size 2983
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ pub use self::{
|
|||
stats::PaintStats,
|
||||
stroke::{PathStroke, Stroke, StrokeKind},
|
||||
tessellator::{TessellationOptions, Tessellator},
|
||||
text::{FontFamily, FontId, Fonts, Galley},
|
||||
text::{FontFamily, FontId, Fonts, FontsView, Galley},
|
||||
texture_atlas::TextureAtlas,
|
||||
texture_handle::TextureHandle,
|
||||
textures::TextureManager,
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue