dfrg / swash

Font introspection, complex text shaping and glyph rendering.
Apache License 2.0
657 stars 38 forks source link

Add support for `no_std` #63

Closed waywardmonkeys closed 1 week ago

waywardmonkeys commented 1 month ago

This doesn't support the scale or render features yet as that needs an update to zeno and yazi.

waywardmonkeys commented 1 month ago

If this lands, I can revise #61 to deal with no_std.

waywardmonkeys commented 1 month ago

I should add a lot of CI to this repo, including for no_std.

waywardmonkeys commented 1 month ago

Added a check for no_std on x86-64-unknown-none.

I didn't use a 32 bit target because the one I chose didn't work due to not having an AtomicU64.

waywardmonkeys commented 1 month ago

I think it'll be best if #61 lands first and then I'll revise this some to support scale, render and fix some associated warnings.

xStrom commented 1 week ago

Swash not having no_std support is blocking Parley from having it, so we should really get this landed. I do agree though that #61 makes sense to land first, because the no_std support has changed in those deps as well.

waywardmonkeys commented 1 week ago

@dfrg I've updated this PR to not have merge conflicts ... it gives no_std support but not for the scale or render features. This is still a breaking change since it requires that someone use either the std or libm features, compilation without them won't work.

xorgy commented 1 week ago

@waywardmonkeys

I didn't use a 32 bit target because the one I chose didn't work due to not having an AtomicU64.

See #69

dfrg commented 1 week ago

oops, I seem to have merged these in the wrong order causing a merge conflict (did the dep updates first)

waywardmonkeys commented 1 week ago

When I am awake today, I will update this so that it is fully no_std now that the deps update landed.

waywardmonkeys commented 1 week ago

@dfrg This is updated now. If you land #70 before this, I'll add some 32 bit no_std CI checks ... otherwise, can do that after these both land.

dfrg commented 1 week ago

@dfrg This is updated now. If you land #70 before this, I'll add some 32 bit no_std CI checks ... otherwise, can do that after these both land.

I just merged #70 so I’ll leave it up to you whether we do the 32-bit checks here.

waywardmonkeys commented 1 week ago

@dfrg This is updated now. If you land #70 before this, I'll add some 32 bit no_std CI checks ... otherwise, can do that after these both land.

I just merged #70 so I’ll leave it up to you whether we do the 32-bit checks here.

Done. I was distracted by trying to fix Zeno's CI and wasn't looking at emails.