Skip to content

Variable Font PostScript instance name construction #869

Open
@bungeman

Description

A variable OpenType font's PostScript name is supposed to vary. This is documented in FreeType by FT_Get_Postscript_Name and implemented in sfnt_get_var_ps_name.

It would be quite useful to provide a means to combine a base PostScript name (from FontRef::localized_strings(POSTSCRIPT_NAME)) and a variation position (from FontRef::axes()) to create the PostScript instance name. Because of the PostScript name length limit and the non-trivial nature of creating the PostScript instance name it would be best to have this in the library instead of expecting users to re-implement this.

The most specific version of this would be to add a FontRef::postscript_name() -> Option<String> like call, or perhaps a more general utility like postscript_instance_name(LocalizedString, AxisCollection) -> String. Because there is a length limit on the PostScript name it would be quite awkward to be any more general than this.

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions