You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could probably do the same, and have the enabled features in the Font struct. But I think the DirectWrite API is better. I could easily implement the Core Text API using DirectWrite, but I couldn't implement the DirectWrite API using Core Text as easily, so I think the DirectWrite API is better. Pango's API seems closer to DirectWrite's. You can apply a font features attr to an item returned from pango_itemize() before passing it to pango_shape(). It even gives font features as an example:
It should be possible to turn on typographic features in a font.
For DirectWrite, the
GetGlyph()
function takes an array ofDWRITE_FONT_FEATURE
s.For Core Text, it looks like you have to create another
CTFont
with the features enabled:https://stackoverflow.com/questions/59464935/uifont-how-to-use-stylistic-alternate-character
I could probably do the same, and have the enabled features in the
Font
struct. But I think the DirectWrite API is better. I could easily implement the Core Text API using DirectWrite, but I couldn't implement the DirectWrite API using Core Text as easily, so I think the DirectWrite API is better. Pango's API seems closer to DirectWrite's. You can apply a font features attr to an item returned frompango_itemize()
before passing it topango_shape()
. It even gives font features as an example:https://docs.gtk.org/Pango/method.Item.apply_attrs.html
Perhaps it would be best to have the
TextAnalyzer::get_glyphs_and_positions()
method take aVec<FeatureRange>
or something. Not sure.The text was updated successfully, but these errors were encountered: