LoadFontCollection loads a font from a collection file and uses the font at the specified index.
(filename string, index int, style FontStyle)
| 445 | |
| 446 | // LoadFontCollection loads a font from a collection file and uses the font at the specified index. |
| 447 | func (family *FontFamily) LoadFontCollection(filename string, index int, style FontStyle) error { |
| 448 | font, err := LoadFontCollection(filename, index, style) |
| 449 | if err != nil { |
| 450 | return err |
| 451 | } |
| 452 | family.fonts[style] = font |
| 453 | font.name = family.name |
| 454 | return nil |
| 455 | } |
| 456 | |
| 457 | // MustLoadFontCollection loads a font from a collection file and uses the font at the specified index. It panics on error. |
| 458 | func (family *FontFamily) MustLoadFontCollection(filename string, index int, style FontStyle) { |
no test coverage detected