Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback list in select_best_match #62

Open
RazrFalcon opened this issue May 24, 2019 · 4 comments
Open

Fallback list in select_best_match #62

RazrFalcon opened this issue May 24, 2019 · 4 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@RazrFalcon
Copy link
Contributor

Currently, fonts for sans/serif/monospace/fantasy/etc. are hardcoded for Win and Mac. And there are only one font for each type.

The problem is that it doesn't guarantee that this font is present. For example, a default Win10 contains the Impact font, but the one used by TravisCI - doesn't.

Here is the list of font families available in a Travis instance:

  • Arial
  • Bahnschrift
  • Calibri
  • Cambria
  • Cambria Math
  • Comic Sans MS
  • Consolas
  • Courier New
  • Ebrima
  • Gadugi
  • Georgia
  • Ink Free
  • Javanese Text
  • Leelawadee UI
  • Lucida Console
  • Malgun Gothic
  • Microsoft Himalaya
  • Microsoft JhengHei
  • Microsoft JhengHei UI
  • Microsoft New Tai Lue
  • Microsoft PhagsPa
  • Microsoft Tai Le
  • Microsoft YaHei
  • Microsoft YaHei UI
  • Microsoft Yi Baiti
  • Mongolian Baiti
  • MV Boli
  • Myanmar Text
  • Nirmala UI
  • Segoe MDL2 Assets
  • Segoe Print
  • Segoe UI
  • Segoe UI Emoji
  • Segoe UI Historic
  • Segoe UI Symbol
  • SimSun
  • NSimSun
  • Times New Roman
  • Trebuchet MS
  • Verdana
  • Webdings
  • Wingdings
  • Yu Gothic
  • Yu Gothic UI

Not sure with one we can use as fantasy. Maybe Ink Free?

@pcwalton
Copy link
Contributor

What a mess. Maybe we should just have a series of fonts to try in order.

@pcwalton pcwalton added the bug Something isn't working label May 24, 2019
@pcwalton
Copy link
Contributor

Oh, I think that's what you were suggesting. Honestly if Impact isn't available, maybe we should just fall back to Arial or something.

@RazrFalcon
Copy link
Contributor Author

I'm not sure what is an expected behavior in general. All I can find is this: https://www.w3.org/Style/Examples/007/fonts.en.html

So we can just hardcode a list of fonts for each style and check them all before returning NotFound. At least on Windows and macOS. Linux/fontconfig already supports CSS-style font names.

Or simple ignore this issue, since there are no obvious solution.

@atouchet
Copy link
Contributor

Travis CI is no longer being used. Is this issue still relevant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants