You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently it only gets the first font in a TTC collection:
truetype.go:548
// Parse returns a new Font for the given TTF or TTC data.//// For TrueType Collections, the first font in the collection is parsed.funcParse(ttf []byte) (font*Font, errerror) {
returnparse(ttf, 0)
}
The Menlo font in particular on Mac would be convenient to have full access to, as it has Italic which NotoSansMono does not. but it is shipped as a ttc file.
However, giving access to a ttc file would require significant additions to the golang font interface, to expose multiple fonts per Face, and select the appropriate one based on weight, style etc. This would add considerable complexity to get it all right. Currently using very simplistic code in GoGi to get by.
Currently it only gets the first font in a TTC collection:
truetype.go:548
The Menlo font in particular on Mac would be convenient to have full access to, as it has Italic which NotoSansMono does not. but it is shipped as a ttc file.
However, giving access to a ttc file would require significant additions to the golang font interface, to expose multiple fonts per Face, and select the appropriate one based on weight, style etc. This would add considerable complexity to get it all right. Currently using very simplistic code in GoGi to get by.
Per this thread, the best soln for now is to just break apart the ttc into separate ttf files:
https://stackoverflow.com/questions/39356906/do-font-files-e-g-ttc-ttf-otf-contain-different-weights
The text was updated successfully, but these errors were encountered: