Skip to main content
GameDev.net gamedev.net
🔒 Locked

SlimDX and DirectWrite custom font help

Started by egwenejs Jan 12, 2015 at 5:22 AM 0 replies 2.7k views
Original Post
egwenejs
egwenejs

I'm trying to load a custom font from a file using DirectWrite through SlimDX. I'm fairly certain I implemented my FontCollectionLoader and FontFileEnumerator correctly. I registered the loader with the DirectWrite factory. The problem the I keep getting is when I called SlimDX.DirectWrite.Factory.CreateCustomFontCollection I have no idea what to pass as the key and key size. Any help would be appreciated.

egwenejs
egwenejs

Well, after two days of trying, it appears that whoever implemented the FileFontEnumerator class in SlimDX didn't do so correctly. It implements the IEnumertor interface instead of the IDWriteFileEnumertor interface and that interface is not exposed through the API at all. Very disappointing.

Unless someone knows a way to turn SlimDX.DirectWrite.FontFile into SlimDX.DirectWrite.TextFormat, I guess i'll have to use a different API. *heavy sigh*

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.