[FontCollector] Add a warning message if a font has variable axes
moi15moi opened this issue · 0 comments
moi15moi commented
Currently, libass doesn't support variable font: libass/libass#386. This means that when the user works in Aegisub, the font may works because it use the os API, but when the font is muxed into a mkv, it may not be supported. For this reason, in the FontCollector, there should be a warning like: Warning: The font X is a variable font. Libass doesn't properly support those font. This leads to unknown behaviour when the font is muxed to a mkv
if a font has variable axes.
Since the FontCollector depend on various API depending of the OS, here are the function that could help us to know if a font is a variable font:
- Windows: IDWriteFontFace5::HasVariations
- macOS: CTFontDescriptorCopyAttribute with kCTFontVariationAttribute as attribute.
- FcPatternGetBool with FC_VARIABLE as object.