Giter Club home page Giter Club logo

Comments (11)

grzegorzrolek avatar grzegorzrolek commented on July 28, 2024 1

Hi Daniel,

In the early days, Windows applications were limited to the four styles in a family that could be style-linked with the typical ‘bold’ and ‘italic’ switches. For this reason, families with more weight styles were often split into smaller ones, each having a separate family name and some sensible ‘regular-to-bold’ style relations (see the help page on font style linking from Adobe for more background on those issues).

Later, the ‘preferred’ name entries were added to allow applications that had no such limitations to group all the styles under a single family name. If available, those names should be used instead. From the Microsoft’s specs:

Preferred Family; For historical reasons, font families have contained a maximum of four styles, but font designers may group more than four fonts to a single family. The Preferred Family allows font designers to include the preferred family grouping which contains more than four fonts. This ID is only present if it is different from ID 1.

and:

Preferred Subfamily; Allows font designers to include the preferred subfamily grouping that is more descriptive than ID 2. This ID is only present if it is different from ID 2 and must be unique for the the Preferred Family.

Be sure to also check the Name ID’s 21 and 22, both part of another, style-based family model used by Microsoft in their Windows Presentation Foundation. It’s described in detail in the whitepaper on font selection mechanisms in WPF.

from source-sans.

frankrolf avatar frankrolf commented on July 28, 2024

This has to do with a number of constraints imposed by operating systems. For instance, the behavior you are describing is tied to Style Linking, which allows for fonts to make use of the Bold and Italic button. However, Windows does not expect more than four fonts to be style linked, therefore a “new” family is opened for styles outside the ordinary Regular/Italic/Bold/Bold Italic range.
Within this new family context, it is also possible to use Italic and Bold buttons, e.g. to go from Light to Light Italic.

Your criticism is valid, however there is probably no workaround in the context of Windows consumer applications. An app that would show all the fonts within the context of a family is for instance InDesign.

You can read more about the name table here:
http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#9.e

from source-sans.

twardoch avatar twardoch commented on July 28, 2024

This may be helpful: http://forum.fontlab.com/index.php?topic=313.0

from source-sans.

pauldhunt avatar pauldhunt commented on July 28, 2024

@readroberts do you care to impart any wisdom on this topic?

from source-sans.

readroberts avatar readroberts commented on July 28, 2024

First, I want to correct an error in the first post. For the faces which are not in the four style-linked faces, name ID 1 is NOT "Source Sans Pro". It is instead "Source Sans Pro " + [style name]. I think this is what you meant to say, as the rest of your observations and conclusions are correct. @frankrolf and @grzegorzrolek correctly describe the issues behind the choice. More practically, what an application should do to enumerate all the faces as a single family is to not use the GDI, but instead use an API that enumerates the Preferred Family name and style. For Source Sans Pro, you should be able to do this within the WPF. However, this is too limiting for a real typographic application, as it limits faces in a family to being only variants of weight, width and slope: any other variants, such as optical size, are forced into separate families.

from source-sans.

twardoch avatar twardoch commented on July 28, 2024

Read, do you know if my assumption is correct that these days, WPF is another "huge yet ephemeral Microsoft project" just like GDI+? I believe that the currently recommended API for Windows app development is DirectWrite, and many apps still use old GDI. Neither GDI+ nor WPF have caught much traction in the end, while some remnants of WPF still exist in Silverlight. AFAIK, the WWS font selection model is not used in DirectWrite.

Well, perhaps these questions would be better addressed at Microsoft...

from source-sans.

readroberts avatar readroberts commented on July 28, 2024

No, I don't know. WPF is alive and well in Internet Explorer and MS -developed web apps, but I have otherwise almost no app development experience or knowledge under Windows.

from source-sans.

dspreadbury avatar dspreadbury commented on July 28, 2024

Thank you, Paul, Read, Adam, Frank, and Grzegorz.

Your responses confirm what I believed to be true, and it is very useful in particular to see the recommendation in Microsoft's OpenType specifications to use IDs 16 and 17 if available.

By way of background: in the project we are working on, we are using Qt, and at present the Qt framework has issues correctly enumerating all styles for fonts, including Source Sans Pro, which we intend to use as our user interface font. I am advocating for the Qt font APIs to be extended to more properly handle modern font families, and I hope this discussion will help persuade their developers of the need to address these issues.

from source-sans.

twardoch avatar twardoch commented on July 28, 2024

Yes, something got badly broken in Qt 5.x. It all worked well in Qt 4.8.

from source-sans.

jobor avatar jobor commented on July 28, 2024

@twardoch This particular issue (QTBUG-38482) was definitely not working in Qt4.
We'd appreciate it, if you'd report any findings of Qt5 regressions at bugreports.qt-project.org. ;)

from source-sans.

adrientetar avatar adrientetar commented on July 28, 2024

Bug confirmed for Qt5, fixings in-progress: https://bugreports.qt-project.org/browse/QTBUG-38482

from source-sans.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.