silnrsi / font-ttf-scripts

Font::TTF::Scripts perl module
Artistic License 2.0
19 stars 7 forks source link

enhancement request: classes.xml should permit nested class references #7

Closed bobh0303 closed 7 years ago

bobh0303 commented 8 years ago

Is the classes xml format described some place? I've seen only examples.

It is used in things like make_gdl -c ... and also add_classes.

What I'd like to be able to do is:

<class name="class1"> glyph1  glyph2  glyph3 </class>
<class name="class2"> class1  glyph4  glyph5 </class>

but this doesn't seem to work. Any reason not to add it?

mhosken commented 8 years ago

Dear Bob,

Is the classes xml format described some place? I've seen only examples.

The DTD is described within add_classes. Run add_classes -h

It is used in things like make_gdl -c ... and also add_classes.

What I'd like to be able to do is:

<class name="class1"> glyph1  glyph2  glyph3 </class>
<class name="class2"> class1  glyph4  glyph5 </class>

but this doesn't seem to work. Any reason not to add it?

None. Go for it. Do we want to use the FEA @class marker?

GB, Martin

bobh0303 commented 8 years ago

None. Go for it. Do we want to use the FEA @class marker?

The prior question is whether, for the purposes of classes.xml, class names and glyph names need to be in different namespaces.

They aren't in GDL (except through convention where c and g prefixes are used to effect separate namespaces), but VOLT and FEA use different namespaces for classes and glyphs.

mhosken commented 8 years ago

Yes they are different namespaces in a font. For the purposes of GDL where they are the same namespaces, we use naming tricks to separate them (g to start a glyph and c to start a class, by convention only, but that's what make_gdl uses).