[PATCH] dwrite: Implement IDWriteCollection1::GetFontSet.

Daniel Lehman dlehman25 at gmail.com
Mon Oct 25 19:58:44 CDT 2021


> Something to try is to check if collections created from same set, but
> with different models, will return same set in GetFontSet().

it's mostly the same, mostly...

the keys and number of fonts are the same in all font sets - the
original FontSet and FontSet created from FontCollections of each
model.  on my Windows 10, the System FontSet has 232 fonts

but the order of fonts in FontSet can vary by the FontCollection model
and both have a different order from the original FontSet.  not sure
how important that is, though

for example, the difference in ordering between each model is with the
Sitka font, which has 6 families (Small, Text, Subheading Heading,
Display, Banner) and 4 faces each (Regular, Bold, Italic, Bold
Italic):
- TYPOGRAPHIC
    - grouped by weight/stretch/style, incrementing index:
        - [Small, Text, Subheading Heading, Display, Banner] Regular
(SITKA.TTC index 0-5)
        - [Small, Text, Subheading Heading, Display, Banner] Italic
(SITKAI.TTC index 0-5)
        - ...
- WEIGHT_STRETCH_STYLE
    - grouped by index, different weight/stretch/style
        - Small [Regular, Italic, Bold, Bold Italic] (SITKA[IBZ].TTC index 0)
        - Text [Regular, Italic, Bold, Bold Italic] (SITKA[IBZ].TTC index 1)
        - ...

the size of the FontCollection varies, with MODEL_WEIGHT_STRETCH_STYLE
having more fonts.  on my Windows 10:
- TYPOGRAPHIC
    - 89 families
    - just one 'Sitka' family
    - same number of fonts as FontSet (232 on my box)
        - 0 Simulations
- WEIGHT_STRETCH_STYLE
    - 94 families
    - 6 families for Sitka: Small, Text, Subheading Heading, Display, Banner
    - more fonts (509 vs 232)
        - each FontFamily has 1 or more Simulations

IDWriteFactory3::CreateFontCollectionFromFontSet uses MODEL_WEIGHT_STRETCH_STYLE

> Related to that, it's worth checking if returned set contains duplicates
> in a sense of same file refrences, and if it does, what kind of duplicates.

FontSets contain duplicate keys that can differ on index (Cambria.ttc,
Sitka.ttc) or weight/stretch/style (Bahnshrift.ttf)

thanks
daniel



More information about the wine-devel mailing list