{"action":"opened","issue":{"url":"https://api.github.com/repos/Automattic/node-canvas/issues/1482","repository_url":"https://api.github.com/repos/Automattic/node-canvas","labels_url":"https://api.github.com/repos/Automattic/node-canvas/issues/1482/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/node-canvas/issues/1482/comments","events_url":"https://api.github.com/repos/Automattic/node-canvas/issues/1482/events","html_url":"https://github.com/Automattic/node-canvas/issues/1482","id":510847974,"node_id":"MDU6SXNzdWU1MTA4NDc5NzQ=","number":1482,"title":"How to use a pre-defined family name in register_font.css?","user":{"login":"schester44","id":15207595,"node_id":"MDQ6VXNlcjE1MjA3NTk1","avatar_url":"https://avatars2.githubusercontent.com/u/15207595?v=4","gravatar_id":"","url":"https://api.github.com/users/schester44","html_url":"https://github.com/schester44","followers_url":"https://api.github.com/users/schester44/followers","following_url":"https://api.github.com/users/schester44/following{/other_user}","gists_url":"https://api.github.com/users/schester44/gists{/gist_id}","starred_url":"https://api.github.com/users/schester44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schester44/subscriptions","organizations_url":"https://api.github.com/users/schester44/orgs","repos_url":"https://api.github.com/users/schester44/repos","events_url":"https://api.github.com/users/schester44/events{/privacy}","received_events_url":"https://api.github.com/users/schester44/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-10-22T19:02:30Z","updated_at":"2019-10-22T19:02:30Z","closed_at":null,"author_association":"NONE","body":"Context: Creating png images using custom fonts\r\n\r\nNot super familiar with node-canvas's c++ side of things so I may be way off but it seems there is some sort of caching going on.  I'm having an issue where some fonts within a family all render using the exact same font face (whichever one was registered first). While digging, I found that these fonts have the same \"preferred family name\" and the same \"style\" properties within their meta info (using FontForge). Using FontForge to change the preferred family name, I was able to get these to work properly but thats not a solution for how we're using node-canvas.\r\n\r\nhttps://github.com/Automattic/node-canvas/blob/d2d632402b7032fb0ff755be138d20b87766aff6/examples/font.js#L14\r\n\r\nThe above example hints that the family name and styles within the font's meta info will be used... Is there a way to override that behavior and provide pre-defined names instead of using whats provided inside the file itself? \r\n\r\nI'm using register font like this:\r\n\r\n```\r\nregisterFont(localFilepath, { family: options.localFontName })\r\n```\r\n\r\n\r\nenv... canvas 2.6.0, node 12, OSX and FreeBSD"}}
{"actor":{"display_login":"schester44"}}