{"action":"created","issue":{"url":"https://api.github.com/repos/mintty/mintty/issues/520","repository_url":"https://api.github.com/repos/mintty/mintty","labels_url":"https://api.github.com/repos/mintty/mintty/issues/520/labels{/name}","comments_url":"https://api.github.com/repos/mintty/mintty/issues/520/comments","events_url":"https://api.github.com/repos/mintty/mintty/issues/520/events","html_url":"https://github.com/mintty/mintty/issues/520","id":137608849,"number":520,"title":"Extended font weight support?","user":{"login":"Arthur2e5","id":6459309,"avatar_url":"https://avatars.githubusercontent.com/u/6459309?v=3","gravatar_id":"","url":"https://api.github.com/users/Arthur2e5","html_url":"https://github.com/Arthur2e5","followers_url":"https://api.github.com/users/Arthur2e5/followers","following_url":"https://api.github.com/users/Arthur2e5/following{/other_user}","gists_url":"https://api.github.com/users/Arthur2e5/gists{/gist_id}","starred_url":"https://api.github.com/users/Arthur2e5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arthur2e5/subscriptions","organizations_url":"https://api.github.com/users/Arthur2e5/orgs","repos_url":"https://api.github.com/users/Arthur2e5/repos","events_url":"https://api.github.com/users/Arthur2e5/events{/privacy}","received_events_url":"https://api.github.com/users/Arthur2e5/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-01T15:44:56Z","updated_at":"2016-03-02T10:00:43Z","closed_at":null,"body":"Mintty will fail to select a font if its 'Weight' info is neither  'Book' (i.e. Regular) nor 'Bold', and when its `lfFaceName`, or 'PostScript 'Family Name' in the font, is not changed to show its weight.\r\n\r\nSo imagine a font 'Foo', with two weights 'Regular' and 'Medium':\r\n\r\n```\r\nPS Fontname: Foo-Regular\r\nPS Family Name: Foo\r\nPS Name For Humans: Foo Regular\r\nOS/2 Weight Class: 400 Regular\r\n---\r\nPS Fontname: Foo-Medium\r\nPS Family Name: Foo\r\nPS Name For Humans: Foo Medium\r\nOS/2 Weight Class: 500 Medium\r\n```\r\n\r\nWhen the user tries to choose 'Foo Medium', mintty will only record `\"Foo\"` as the face name, and since this is not a bold, `is_bold` is not written either. What mintty ends up doing will be choosing `Foo`, so `Foo Regular` in the end. Interestingly, hand-specifying `Font=Foo Medium` works, although one may really expect the definition of face/family names in `lpszFace` to be the really same as the one in `lfFaceName`.\r\n\r\nFor a real life example, try [Inziu Iosevka](https://be5invis.github.io/Iosevka/inziu.html) SC 1.7.5. This font marks its bold weight as demi (be5invis/Iosevka#68), making it not selectable. `Font=Inziu Iosevka SC Bold` or `mintty -o font='Inziu Iosevka SC Bold'` gives you the expected image of everything being bold (which is, well, hardly enjoyed by anyone).\r\n"},"comment":{"url":"https://api.github.com/repos/mintty/mintty/issues/comments/191165906","html_url":"https://github.com/mintty/mintty/issues/520#issuecomment-191165906","issue_url":"https://api.github.com/repos/mintty/mintty/issues/520","id":191165906,"user":{"login":"mintty","id":12740416,"avatar_url":"https://avatars.githubusercontent.com/u/12740416?v=3","gravatar_id":"","url":"https://api.github.com/users/mintty","html_url":"https://github.com/mintty","followers_url":"https://api.github.com/users/mintty/followers","following_url":"https://api.github.com/users/mintty/following{/other_user}","gists_url":"https://api.github.com/users/mintty/gists{/gist_id}","starred_url":"https://api.github.com/users/mintty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mintty/subscriptions","organizations_url":"https://api.github.com/users/mintty/orgs","repos_url":"https://api.github.com/users/mintty/repos","events_url":"https://api.github.com/users/mintty/events{/privacy}","received_events_url":"https://api.github.com/users/mintty/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T10:00:43Z","updated_at":"2016-03-02T10:00:43Z","body":"Taking up your case, you might want to use the Medium weight for normal display (and not use the \"BoldAsFont\" option).\r\nThe question is, how to select that? Simply comparing FW_MEDIUM instead of FW_BOLD is not a good idea because there could be other font families where MEDIUM is the \"Normal\" weight and there is another bolder weight; then the lighter weight would be marked as bold which is not desirable. A list of available weights of the selected font family would help here. I'll look into this, but if it turns out the Windows API doesn't easily provide such a list, I'm not sure implementing this is worth the effort.\r\nOpinions and support welcome..."}}