rust-font-loader icon indicating copy to clipboard operation
rust-font-loader copied to clipboard

DirectWrite integration

Open matprec opened this issue 7 years ago • 3 comments

@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:

  • [ ] Enhance the gdi interop implementation in DirectWrite
  • [ ] Adapt interface

matprec avatar Dec 06 '16 18:12 matprec

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.

vvuk avatar Dec 06 '16 19:12 vvuk

@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 :)

matprec avatar Dec 10 '16 11:12 matprec

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

atouchet avatar Apr 10 '20 00:04 atouchet