Question about italic generation

Hey,

a bit of a vague question, but I am trying to understand some of the underlying mechanics regarding italic font files.

I am working with a javascript (which in turn uses Opentype.js) for detecting if a woff file is an italic or not. The script checks for a value of “fsSelection” is the OS2 table.

My question about Glyphs is this: When I generate an italic font these values get set correctly and automatically (I don’t set such a field in the Font info anywhere), but what exactly triggers this generation of those values?

The Bold and Italic checkboxes in the style linking info in File > Font Info > Instances.

Riight; I’m not sure if I need to check the checkbox on every instance 8say I have 7 weights), so far I only had it checked for the “Regular” weight - however, those “fsSelection” values do get set for every generated instance - is this inferred from the one linked instance, or is there something else that triggers this value to be set?

(And side question, would this mean for my “Thin Italic” I would check it as 'Italic of “Thin”? I understood those checkboxes only to be designating one bold and one italic version, so make a “pair” of four styles, regular and bold with matching italics.)

Yes. There are different strategies, though. Discussed in the handbook.

Thanks, found it in the manual, section 7.3.4 for anyone looking.

Remains my question about the reason or trigger that sets fsSelection in a font - where does this happen and under what circumstances?

The fsSelection value is calculated by makeOTF. You can check the values that are needed to it in the generateFont.command file in the Temp folder.

Ah okay, thanks for the pointer. Even fonts that don’t have the -i in the command become italic, apparently (if I understood correctly) it gets also sniffed form the font name as the message would indicate here, which would then make even those fonts “italics” in the export. The woff export just wraps the result of the makeOTF, no?

Yes. WOFF is only a compression format. Inside is a regular OTF or TTF.