character-map-uwp / Character-Map-UWP

A modern, native UWP replacement for the Win32 Character Map and Windows Font Viewer with flawless high DPI and touch support.
MIT License
633 stars 54 forks source link

Italics generated by STAT table is not properly handled #113

Open be5invis opened 4 years ago

be5invis commented 4 years ago

The Inter V font is a variable with two axes — wght and ital, represents Weight and Italic-ness respectively. According to its STAT table (which exports its named instances) the glyphs should be slanted under all instances with "Italic" suffix. However, Character Map is not properly handling italicness, and glyphs remained upright.

image image

Font used: Inter-V.zip

JohnnyWestlake commented 4 years ago

The main problem here is the UI layer (UWP XAML) doesn't understand what the slnt axis is. Underneath at the DirectWrite layer it's all there, but not in the Windows UI layer.

Like a lot of these tied to the UI layer, the solution is to either wait for Microsoft to release WinUI 3 (the open source variant of XAML, so that we can actually fix this properly at the UI layer), or re-write the character map grid entirely in DirectX (which is not impossible but leads to lot of extra work around input and keyboards and GPU handling and accessibility), or replace the text rendering with a custom one (which I've tried, and did not have good performance or memory usage).

At the moment I'm not likely to attempt the DirectX rewrite (though anyone can feel free), and WinUI3 is at least 6 months away.

JohnnyWestlake commented 4 years ago

(Full support for variable OpenType Axis for Type Ramp view only is currently in the Character-Map-UWP/Variations-Basic dev branch. This won't be coming to character map view for the time being for performance reasons.)

JohnnyWestlake commented 3 years ago

Issue is still present in DirectUI on Windows 11