C# Class Bloom.Publish.FontFileFinder

This class handles the problem of finding what files contain the definition of the various faces of a particular font. So far the best approach involves a scan of the whole font directory, so it is much more efficient to build a dictionary once, or at least once per operation that uses it. The dictionary and method could be static, but then, we would miss the chance to find any new fonts added since the last operation that needed this information.
Afficher le fichier Open project: BloomBooks/BloomDesktop Class Usage Examples

Private Properties

Свойство Type Description
FindLinuxFonts IEnumerable
FindLinuxFonts IEnumerable

Méthodes publiques

Méthode Description
GetFilesForFont ( string fontName ) : IEnumerable

This is really hard. We somehow need to figure out what font file(s) are used for a particular font. http://stackoverflow.com/questions/16769758/get-a-font-filename-based-on-the-font-handle-hfont has some ideas; the result would be Windows-specific. And at some point we should ideally consider what faces are needed. For now we use brute force. 'Andika New Basic' -> AndikaNewBasic-{R,B,I,BI}.ttf Arial -> arial.ttf/ariali.ttf/arialbd.ttf/arialbi.ttf 'Charis SIL' -> CharisSIL{R,B,I,BI}.ttf (note: no hyphen) Doulos SIL -> DoulosSILR

GetGroupForFont ( string fontName ) : FontGroup

Private Methods

Méthode Description
FindLinuxFonts ( ) : IEnumerable
FindLinuxFonts ( string folder ) : IEnumerable

Method Details

GetFilesForFont() public méthode

This is really hard. We somehow need to figure out what font file(s) are used for a particular font. http://stackoverflow.com/questions/16769758/get-a-font-filename-based-on-the-font-handle-hfont has some ideas; the result would be Windows-specific. And at some point we should ideally consider what faces are needed. For now we use brute force. 'Andika New Basic' -> AndikaNewBasic-{R,B,I,BI}.ttf Arial -> arial.ttf/ariali.ttf/arialbd.ttf/arialbi.ttf 'Charis SIL' -> CharisSIL{R,B,I,BI}.ttf (note: no hyphen) Doulos SIL -> DoulosSILR
public GetFilesForFont ( string fontName ) : IEnumerable
fontName string
Résultat IEnumerable

GetGroupForFont() public méthode

public GetGroupForFont ( string fontName ) : FontGroup
fontName string
Résultat FontGroup