Denis Sletkov
Denis Sletkov

Reputation: 231

Find characters supported by a font

I need to find what Unicode characters are supported by a font. There is a WinAPI function GetFontUnicodeRanges, but they work only for BMP (Basic Multilingual Plane). Is there any function or source code example that work also for SMP (Supplementary Multilingual Plane). I know that DirectWrite have such function but I do not use DirectX/DirectWrite in my application.

Upvotes: 2

Views: 439

Answers (1)

Peter Constable
Peter Constable

Reputation: 3570

There is no reason why not to use DWrite in your app for this purpose. As you pointed out, GetFontUnicodeRanges supports only BMP, so if you want SMP or other characters you need to use something else, so why not use DWrite. You can use the IDWriteFont1::GetUnicodeRanges method to get the info you want.

Upvotes: 1

Related Questions