C# 클래스 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.
파일 보기 프로젝트 열기: BloomBooks/BloomDesktop 1 사용 예제들

Private Properties

프로퍼티 타입 설명
FindLinuxFonts IEnumerable
FindLinuxFonts IEnumerable

공개 메소드들

메소드 설명
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

비공개 메소드들

메소드 설명
FindLinuxFonts ( ) : IEnumerable
FindLinuxFonts ( string folder ) : IEnumerable

메소드 상세

GetFilesForFont() 공개 메소드

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
리턴 IEnumerable

GetGroupForFont() 공개 메소드

public GetGroupForFont ( string fontName ) : FontGroup
fontName string
리턴 FontGroup