matprec / rust-font-loader

A font loading utility written in rust.
MIT License
52 stars 19 forks source link

DirectWrite integration #2

Open matprec opened 7 years ago

matprec commented 7 years ago

@vvuk wrote Rust bindings for DirectWrite which some applications use internally, e.g. WR/Servo. Currently, we're using wingdi for font enumeration, but DirectWrite has an interoperabillity interface for wingdi, but this part isn't ported yet.

ToDo:

vvuk commented 7 years ago

Do you actually need the GDI interop? If dwrite is available, it seems like the crate should fully use it and not go to GDI at all.

matprec commented 7 years ago

@vvuk Yes GDI interop is desired, as of the current state of winapi-rs bindings, one can't figure out whether or not a font is monospaced. For reference MSDN Docs and winapi-rs Docs. Also, font loading from disk isn't implemented yet, so this would be the most easy way for us to maintain our interface.

I have the corresponding PR almost ready, expect it to come soon :)

atouchet commented 4 years ago

For reference the upstream dwrote repo is now located at: https://github.com/servo/dwrote-rs