Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dfrg committed Aug 16, 2024
1 parent 272ca76 commit e8ab0eb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion examples/swash_render/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ fn main() {
let mut layout: Layout<Color> = builder.build();

// Perform layout (including bidi resolution and shaping) with start alignment
layout.break_all_lines(max_advance);
layout.align(max_advance, Alignment::Start);

// Create image to render into
Expand Down
2 changes: 1 addition & 1 deletion examples/tiny_skia_render/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn main() {
let mut layout: Layout<PenikoColor> = builder.build();

// Perform layout (including bidi resolution and shaping) with start alignment
layout.break_all_lines(max_advance);
layout.break_all_lines(max_advance, Alignment::Start);
layout.align(max_advance, Alignment::Start);
let width = layout.width().ceil() as u32;
let height = layout.height().ceil() as u32;
Expand Down
1 change: 0 additions & 1 deletion examples/vello_editor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use anyhow::Result;
use std::num::NonZeroUsize;
use std::sync::Arc;
use vello::kurbo::{Affine, Circle, Ellipse, Line, RoundedRect, Stroke};
use vello::peniko::Color;
use vello::util::{RenderContext, RenderSurface};
use vello::wgpu;
Expand Down
11 changes: 5 additions & 6 deletions examples/vello_editor/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type Layout = parley::Layout<Color>;

const INSET: f32 = 32.0;

#[allow(dead_code)]
#[derive(Copy, Clone, Debug)]
pub enum ActiveText<'a> {
FocusedCluster(&'a str),
Expand Down Expand Up @@ -79,8 +80,8 @@ impl Text {
.modifiers
.map(|mods| mods.state().shift_key())
.unwrap_or_default();
match event.physical_key {
PhysicalKey::Code(code) => match code {
if let PhysicalKey::Code(code) = event.physical_key {
match code {
KeyCode::ArrowLeft => {
self.selection = self.selection.prev_logical(&self.layout, shift);
}
Expand Down Expand Up @@ -116,7 +117,7 @@ impl Text {
let start = if self.selection.is_collapsed() {
let end = self.selection.focus().text_start;
if let Some((start, _)) =
self.buffer[..end].char_indices().rev().next()
self.buffer[..end].char_indices().next_back()
{
self.buffer.replace_range(start..end, "");
self.update_layout(self.width, 1.0);
Expand Down Expand Up @@ -145,8 +146,7 @@ impl Text {
Selection::from_byte_index(&self.layout, start + text.len());
}
}
},
_ => {}
}
}

println!("Active text: {:?}", self.active_text());
Expand Down Expand Up @@ -212,7 +212,6 @@ impl Text {
let glyph_xform = synthesis
.skew()
.map(|angle| Affine::skew(angle.to_radians().tan() as f64, 0.0));
let style = glyph_run.style();
let coords = run
.normalized_coords()
.iter()
Expand Down

0 comments on commit e8ab0eb

Please sign in to comment.