[mpeg-OTspec] Creating ReqFeatureIndex in real fonts?

Thomas Phinney tphinney at cal.berkeley.edu
Fri Aug 31 07:56:41 CEST 2012


Thanks, Adam! I didn't think of ttx for this, but as I use that tool all
the time I am happy to use it for this purpose, now that I know how.

Khaled: Good to know that FontForge can handle it as well.

Cheers,

T

On Thu, Aug 30, 2012 at 2:25 PM, Adam Twardoch (List) <
list.adam at twardoch.com> wrote:

> On 12-08-30 20:49, Thomas Phinney wrote:
> >
> >
> > I have a different question about ReqFeatureIndex.
> >
> > I am collaborating on a special-purpose font, whose entire purpose is
> > tied up in having ligatures work. It is useless without them. It seems
> > to me like as a practical matter, ReqFeatureIndex would be a good way
> > to make those ligatures work in more environments, at least in
> > versions of Windows and Office that might not otherwise support those
> > ligatures.
> > What tools actually support making fonts with ReqFeatureIndex? I'm
> > happy using FontLab Studio. AFDKO would not be the ideal workflow for
> > this project, but is possible. I would be fine with learning VOLT. I'd
> > use FontForge if scary weapons were pointed at me, or I had no
> > alternative.
> You'll certainly be able to use FontTools/TTX and set the
> ReqFeatureIndex in the post-production step.
>
> Regardless of which tool you use to build the GSUB and GPOS tables, you
> would then run
>
>   ttx -t GSUB myfont.otf
>
> which will yield you a "myfont.ttx" file which will contain the GSUB
> table. Inside, you'll find something like this:
>
>   <GSUB>
>     <Version value="1.0"/>
>     <ScriptList>
>       <ScriptRecord index="0">
>         <ScriptTag value="latn"/>
>         <Script>
>           <DefaultLangSys>
>             <ReqFeatureIndex value="65535"/>
>             <FeatureIndex index="0" value="7"/>
>             <FeatureIndex index="1" value="6"/>
>             <FeatureIndex index="2" value="12"/>
>             <FeatureIndex index="3" value="25"/>
>             ...
>             </LangSys>
>           </LangSysRecord>
>         </Script>
>       </ScriptRecord>
>     </ScriptList>
>     <FeatureList>
>       ...
>       <FeatureRecord index="12">
>         <FeatureTag value="liga"/>
>         <Feature>
>           <LookupListIndex index="0" value="37"/>
>           <LookupListIndex index="1" value="38"/>
>         </Feature>
>       </FeatureRecord>
>
> If you change the line
>             <ReqFeatureIndex value="65535"/>
> to
>             <ReqFeatureIndex value="2"/>
> then FeatureIndex 2 will be the ReqFeatureIndex. FeatureIndex 2 points
> to FeatureRecord 12, and FeatureRecord 2 implements the "liga" feature
> with two lookups.
>
> So basically, you'll need to locate the FeatureRecord for the feature
> entry that you're interested in, then look up its reference in the
> appropriate languagesystem list, and then just set the FeatureIndex of
> that record as the ReqFeatureIndex for that languagesystem.
>
> It's relatively easy.
>
> Then you just run
>
>   ttf -m myfont.otf myfont.ttx
>
> and you'll get myfont#1.otf, which will have the modified GSUB table.
>
> Best,
> Adam
>
> --
>
> May success attend your efforts,
> -- Adam Twardoch
> (Remove "list." from e-mail address to contact me directly.)
>
>


-- 
“Anti-intellectualism has been a constant thread winding its way through
our political and cultural life, nurtured by the false notion that
democracy means that ‘my ignorance is just as good as your knowledge.’”
 —Isaac Asimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.aau.at/pipermail/mpeg-otspec/attachments/20120830/745c8489/attachment.html>


More information about the mpeg-otspec mailing list