Monday, October 1, 2012

Windows 8: Open Type Fonts are not supported

Some things you have to find out the hard way.

I blogged before about how to embed a custom font in your Windows 8 application. So we followed these steps to add another font to the application, but no luck, no matter what we tried we couldn’t get it working.

So what could be different from the original font we tried to embed? It took us some time to discover the one and only difference; before we were using a True Type Font(.ttf) and this was an Open Type Font(.otf). After switching to the same font in ttf format(using a converter didn’t work), our new font was finally there.

Lesson learned: Open Type Fonts are not supported on Windows 8.

6 comments:

Dave Van den Eynde said...

I'm having a hard time believing this. Consider this excerpt:

"For XAML, advanced OpenType capabilities that were supported in WPF and Silverlight are also supported in the Windows Runtime XAML framework."

from here:
http://msdn.microsoft.com/en-US/bb688099#W8

Bart Wullems said...

Hi Dave,

We tested it and couln't get any otf font working. TTF worked without any issue.

So if you can think of another reason why it didn't work or if you can prove that it does work, I'm happy to get your feedback...

HÃ¥kan reis said...

Well I am using open type fonts right now but have had quite some problem. The the problem started wit some of the font files working and not others. Thew problem was the variant of the font that was inserted after the #

For example "/Fonts/XXXBasic-Regular.otf#SEB Basic" worked as it should but adding the extra bold font didn't ("/Assets/SEBBasic-ExtraBold.otf#SEB Basic ExtraBold")

At least not until I edited the name after the #. So when I added the "/Assets/SEBBasic-ExtraBold.otf#SEB Basic" instead it worked.

My guess is that the #Name is grabbed from the font name property in the OTF but it's not what it is supposed to. While in the TTF case this information happen to be correct.

Miscoria Dennis said...

It is true that you aren't allowed to use bold/light/extralight in your font names! We had the same behavior with the TTF versions...

Anonymous said...

Just rename the font file: *.otf -> *.ttf
Then install it (right click > ...)

TW said...

In the file path, just type the name of the font file.
In the font name, only type the font family name WITHOUT adding the weight property such as: bold, light, italic, ..etc.

see https://abnady.wordpress.com/2013/12/17/adding-custom-fonts-to-windows-store-app/