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

Draft implementation of wasm shaper #122

Merged
merged 26 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6053e0b
add `.vscode` to `gitignore`
asibahi Jul 2, 2024
40a8cf8
WIP : initial wasm structure
asibahi Jul 3, 2024
8deb543
typofix
asibahi Jul 3, 2024
def1128
implement some of the import functions
asibahi Jul 3, 2024
5160985
Merge branch 'RazrFalcon:master' into wasm_shaper
asibahi Jul 3, 2024
aaef802
give more flesh. plenty of todo!()s left
asibahi Jul 3, 2024
f080e29
slightly more wrangling
asibahi Jul 3, 2024
4865ba0
more fleshing out wasm work. in need of review.
asibahi Jul 3, 2024
d5ef3cf
different approach to pointers. unable to massage borrow checker yet
asibahi Jul 4, 2024
ac25191
revise assumptions about memory allocations
asibahi Jul 4, 2024
2202d8b
Added Test. Not failing but not producing the expected result
asibahi Jul 4, 2024
57da6f0
Merge branch 'RazrFalcon:master' into wasm_shaper
asibahi Jul 4, 2024
06ae9dd
fixed potential bug. test still failing
asibahi Jul 4, 2024
ef0b838
no functional changes, just make it easier to navigate.
asibahi Jul 4, 2024
4c3595d
replace many transmutes with bytemuck.
asibahi Jul 5, 2024
9b0809c
CALCULATOR WASM WORKS NOW
asibahi Jul 5, 2024
b535177
implement `shape_with` + other fixes.
asibahi Jul 6, 2024
230ea71
initial impl for `font_copy_glyph_outline` . Needs check for correctn…
asibahi Jul 6, 2024
82929f8
random fixes + added failing ruqaa font test.
asibahi Jul 6, 2024
b0845a5
fixed contours geenration. n_contours is actually the indices of the …
asibahi Jul 7, 2024
7a0da1f
everything works but test is failing for weird reasons
asibahi Jul 7, 2024
77133bd
Bookkeeping and added optional feature.
asibahi Jul 8, 2024
1da938f
wasmi, change where tests live, general cleanup
asibahi Jul 9, 2024
11a062b
added `log` dep. worked around cloning things.
asibahi Jul 10, 2024
84b9f58
found the bug. tests pass (mostly). Ruqaa works.
asibahi Jul 11, 2024
234ef56
should be done.
asibahi Jul 11, 2024
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ Cargo.lock
.directory
.DS_Store
/src/complex/*.ri
.vscode
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ unicode-bidi-mirroring = "0.3.0"
unicode-ccc = "0.3.0"
unicode-properties = { version = "0.1.0", default-features = false, features = ["general-category"] }
unicode-script = "0.5.2"
wasmtime = "22.0.0"
asibahi marked this conversation as resolved.
Show resolved Hide resolved

[dependencies.ttf-parser]
version = "0.24.0"
Expand Down
2 changes: 1 addition & 1 deletion src/hb/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub struct GlyphPosition {
/// How much the glyph moves on the Y-axis before drawing it, this should
/// not affect how much the line advances.
pub y_offset: i32,
var: u32,
pub(crate) var: u32,
}

unsafe impl bytemuck::Zeroable for GlyphPosition {}
Expand Down
1 change: 1 addition & 0 deletions src/hb/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ impl<'a> hb_font_t<'a> {
}

#[derive(Clone, Copy, Default)]
#[repr(C)]
pub struct hb_glyph_extents_t {
pub x_bearing: i32,
pub y_bearing: i32,
Expand Down
2 changes: 2 additions & 0 deletions src/hb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ mod ot_shaper_vowel_constraints;
mod paint_extents;
mod set_digest;
pub mod shape;
// featurething
mod shape_wasm;
mod tag;
mod tag_table;
mod text_parser;
Expand Down
Loading
Loading