Skip to content

Commit 5ae3fb2

Browse files
Add typos check to CI, fix extant typos. (#87)
1 parent caabcf1 commit 5ae3fb2

File tree

4 files changed

+39
-4
lines changed

4 files changed

+39
-4
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,12 @@ jobs:
228228
# We test documentation using nightly to match docs.rs. This prevents potential breakages
229229
- name: cargo doc
230230
run: cargo doc --workspace --locked --all-features --no-deps --document-private-items -Zunstable-options -Zrustdoc-scrape-examples
231+
232+
# If this fails, consider changing your text or adding something to .typos.toml
233+
typos:
234+
runs-on: ubuntu-latest
235+
steps:
236+
- uses: actions/checkout@v4
237+
238+
- name: check typos
239+
uses: crate-ci/typos@v1.23.2

.typos.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See the configuration reference at
2+
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
3+
4+
# Corrections take the form of a key/value pair. The key is the incorrect word
5+
# and the value is the correct word. If the key and value are the same, the
6+
# word is treated as always correct. If the value is an empty string, the word
7+
# is treated as always incorrect.
8+
9+
# Match Identifier - Case Sensitive
10+
[default.extend-identifiers]
11+
Beng = "Beng"
12+
Maka = "Maka"
13+
ot = "ot"
14+
ot_a = "ot_a"
15+
ot_b = "ot_b"
16+
wdth = "wdth"
17+
18+
# Match Inside a Word - Case Insensitive
19+
[default.extend-words]
20+
21+
[files]
22+
# Include .github, .cargo, etc.
23+
ignore-hidden = false
24+
# /.git isn't in .gitignore, because git never tracks it.
25+
# Typos doesn't know that, though.
26+
extend-exclude = ["/.git"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ This includes applying ligatures, resolving emoji modifiers, but also much more
5858
Swash's implementation is faster but less complete and tested than Harfbuzz and Rustybuzz.
5959

6060
Swash also implements font parsing, scaling, and hinting.
61-
This part of Swash is now superseeded by Skrifa: the implementation in Skrifa is directly descended from the one in Swash.
61+
This part of Swash is now superseded by Skrifa: the implementation in Skrifa is directly descended from the one in Swash.
6262

6363
### Parley
6464

parley/src/layout/line/greedy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ impl<'a, B: Brush> BreakLines<'a, B> {
118118
}
119119
}
120120

121-
/// Reset state when a line has been comitted
121+
/// Reset state when a line has been committed
122122
fn start_new_line(&mut self) -> Option<(f32, f32)> {
123123
self.state.items = self.lines.line_items.len();
124124
self.state.lines = self.lines.lines.len();
@@ -319,7 +319,7 @@ impl<'a, B: Brush> BreakLines<'a, B> {
319319
// println!("REVERT");
320320
// debug_assert!(prev.state.x != 0.0);
321321

322-
// Q: Why do we revert the line state here, but only revert the indexes if the commit suceeds?
322+
// Q: Why do we revert the line state here, but only revert the indexes if the commit succeeds?
323323
self.state.line = prev.state;
324324
if try_commit_line!(BreakReason::Regular) {
325325
// Revert boundary state to prev state
@@ -495,7 +495,7 @@ impl<'a, B: Brush> BreakLines<'a, B> {
495495
continue;
496496
}
497497

498-
// Compute the run's advance by summing the advances of it's constituant clusters
498+
// Compute the run's advance by summing the advances of it's constituent clusters
499499
line_item.advance = self.layout.clusters[line_item.cluster_range.clone()]
500500
.iter()
501501
.map(|c| c.advance)

0 commit comments

Comments
 (0)