のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

TypefaceImpl

     29 struct TypefaceImpl {
     30     FontCollection *fFontCollection;
     31 
     32     // style used for constructing and querying Typeface objects
     33     SkTypeface::Style fSkiaStyle;
     34     // base weight in CSS-style units, 100..900
     35     int fBaseWeight;
     36 
     37     // resolved style actually used for rendering
     38     FontStyle fStyle;
     39 };
     29 class FontCollection : public MinikinRefCounted {
     51 private:
     52     static const int kLogCharsPerPage = 8;
     53     static const int kPageMask = (1 << kLogCharsPerPage) - 1;
     64 
     67     // static for allocating unique id's
     68     static uint32_t sNextId;
     69 
     70     // unique id for this font collection (suitable for cache key)
     71     uint32_t mId;
     72 
     73     // Highest UTF-32 code point that can be mapped
     74     uint32_t mMaxChar;
     75 
     76     // This vector has ownership of the bitsets and typeface objects.
     77     std::vector<FontInstance> mInstances;
     78 
     79     // This vector contains pointers into mInstances
     80     std::vector<const FontInstance*> mInstanceVec;
     81 
     82     // These are offsets into mInstanceVec, one range per page
     83     std::vector<Range> mRanges;
     55     struct FontInstance {
     56         SparseBitSet* mCoverage;
     57         FontFamily* mFamily;
     58     };
     60     struct Range {
     61         size_t start;
     62         size_t end;
     63     };