Skip to content
Open
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
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ Cargo.lock

*.swp

# IDE configs
.idea/
.vscode/

# Potential products from TeX while testing
*.pdf
*.log
*.aux
*.iml

.vscode

# Product of `qc` binary
test.svg

Expand Down
10 changes: 5 additions & 5 deletions fonts/stix2/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ static DIGIT_LUT: [u32; 28] = [
#[inline]
pub fn style_symbol(codepoint: u32, style: Style) -> u32 {
match codepoint {
LOWER_A...LOWER_Z => style_lookup(&LATIN_LOWER_LUT, codepoint, style),
UPPER_A...UPPER_Z => style_lookup(&LATIN_UPPER_LUT, codepoint, style),
UPPER_ALPHA...UPPER_OMEGA => style_lookup(&GREEK_UPPER_LUT, codepoint, style),
LOWER_ALPHA...LOWER_OMEGA => style_lookup(&GREEK_LOWER_LUT, codepoint, style),
DIGIT_0...DIGIT_9 => style_lookup(&DIGIT_LUT, codepoint, style),
LOWER_A..=LOWER_Z => style_lookup(&LATIN_LOWER_LUT, codepoint, style),
UPPER_A..=UPPER_Z => style_lookup(&LATIN_UPPER_LUT, codepoint, style),
UPPER_ALPHA..=UPPER_OMEGA => style_lookup(&GREEK_UPPER_LUT, codepoint, style),
LOWER_ALPHA..=LOWER_OMEGA => style_lookup(&GREEK_LOWER_LUT, codepoint, style),
DIGIT_0..=DIGIT_9 => style_lookup(&DIGIT_LUT, codepoint, style),
_ => style_other(codepoint, style),
}
}
Expand Down
1 change: 0 additions & 1 deletion src/layout/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ impl Style {
}

fn font_scale(self) -> FontUnit {
use font::constants;
match self {
Style::Display | Style::DisplayCramped | Style::Text | Style::TextCramped => {
FontUnit::from(1)
Expand Down
4 changes: 2 additions & 2 deletions src/parser/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub fn command(lex: &mut Lexer, local: Style) -> Result<Option<ParseNode>> {
}
}

/// Parse an implicit group. For example `\left ... \right` is an implicit group.
/// Parse an implicit group. For example `\left ..= \right` is an implicit group.
/// This is one point where we will deviate from TeX a little bit. We won't
/// characterize every command that will start a new implicit group
/// (for instance, `\frac`).
Expand Down Expand Up @@ -403,7 +403,7 @@ pub fn parse(input: &str) -> Result<Vec<ParseNode>> {
/// negatives when used for other things.
fn codepoint_atom_type(codepoint: char) -> Option<AtomType> {
Some(match codepoint {
'a'...'z' | 'A'...'Z' | '0'...'9' | 'Α'...'Ω' | 'α'...'ω' => AtomType::Alpha,
'a'..='z' | 'A'..='Z' | '0'..='9' | 'Α'..='Ω' | 'α'..='ω' => AtomType::Alpha,
'*' | '+' | '-' => AtomType::Binary,
'[' | '(' => AtomType::Open,
']' | ')' | '?' | '!' => AtomType::Close,
Expand Down
2 changes: 0 additions & 2 deletions src/render/svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ pub fn render_to_path<P: AsRef<Path>>(path: P, settings: &RenderSettings, input:
}

pub fn render_to_file(file: &mut File, settings: &RenderSettings, input: &str) {
use std::io::Write;

let s: Vec<u8> = SVGRenderer::new(&settings)
.render(input)
.expect("failed to render");
Expand Down