Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: adds missing documentation #586

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/conversion/typst2vec/src/incr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct IncrDocServer {
}

impl IncrDocServer {
/// Set whether to attach debug info to the spans.
pub fn set_should_attach_debug_info(&mut self, should_attach_debug_info: bool) {
self.typst2vec
.spans
Expand Down
1 change: 1 addition & 0 deletions crates/conversion/typst2vec/src/ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use typst::text::Font;
/// A glyph item.
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub enum GlyphItem {
/// A missing glyph.
None,

/// Raw glyph representation.
Expand Down
8 changes: 4 additions & 4 deletions crates/conversion/typst2vec/src/path2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ impl SvgPath2DBuilder {

impl ttf_parser::OutlineBuilder for SvgPath2DBuilder {
fn move_to(&mut self, x: f32, y: f32) {
write!(&mut self.0, "M {} {} ", x, y).unwrap();
write!(&mut self.0, "M {x} {y} ").unwrap();
}

fn line_to(&mut self, x: f32, y: f32) {
write!(&mut self.0, "L {} {} ", x, y).unwrap();
write!(&mut self.0, "L {x} {y} ").unwrap();
}

fn quad_to(&mut self, x1: f32, y1: f32, x: f32, y: f32) {
write!(&mut self.0, "Q {} {} {} {} ", x1, y1, x, y).unwrap();
write!(&mut self.0, "Q {x1} {y1} {x} {y} ").unwrap();
}

fn curve_to(&mut self, x1: f32, y1: f32, x2: f32, y2: f32, x: f32, y: f32) {
write!(&mut self.0, "C {} {} {} {} {} {} ", x1, y1, x2, y2, x, y).unwrap();
write!(&mut self.0, "C {x1} {y1} {x2} {y2} {x} {y} ").unwrap();
}

fn close(&mut self) {
Expand Down
1 change: 1 addition & 0 deletions crates/conversion/typst2vec/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ impl AbsExt for Abs {

/// Additional methods for types that can be converted to CSS.
pub trait ToCssExt {
/// Convert to a CSS string.
fn to_css(self) -> String;
}

Expand Down
Loading