/third_party/skia/src/core/ |
H A D | SkFontStream.cpp | 55 static int count_tables(SkStream* stream, int ttcIndex, size_t* offsetToDir) { in count_tables() argument 56 SkASSERT(ttcIndex >= 0); in count_tables() 72 if ((unsigned)ttcIndex >= count) { in count_tables() 76 if (ttcIndex > 0) { // need to read more of the shared header in count_tables() 78 size_t amount = sizeof(SkSharedTTHeader) + ttcIndex * sizeof(uint32_t); in count_tables() 85 offset = SkEndian_SwapBE32((&header->fCollection.fOffset0)[ttcIndex]); in count_tables() 114 bool init(SkStream* stream, int ttcIndex) { in init() 118 fCount = count_tables(stream, ttcIndex, &offsetToDir); in init() 156 int SkFontStream::GetTableTags(SkStream* stream, int ttcIndex, in GetTableTags() argument 159 if (!header.init(stream, ttcIndex)) { in GetTableTags() 171 GetTableData(SkStream* stream, int ttcIndex, SkFontTableTag tag, size_t offset, size_t length, void* data) GetTableData() argument [all...] |
H A D | SkFontStream.h | 28 * @param ttcIndex 0 for normal sfnts, or the index within a TTC sfnt. 33 static int GetTableTags(SkStream*, int ttcIndex, SkFontTableTag tags[]); 36 * @param ttcIndex 0 for normal sfnts, or the index within a TTC sfnt. 41 static size_t GetTableData(SkStream*, int ttcIndex, SkFontTableTag tag, 44 static size_t GetTableSize(SkStream* stream, int ttcIndex, SkFontTableTag tag) { in GetTableSize() argument 45 return GetTableData(stream, ttcIndex, tag, 0, ~0U, nullptr); in GetTableSize()
|
H A D | SkTypeface.cpp | 43 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override { return nullptr; } 128 int ttcIndex = args.getCollectionIndex(); in GetVarFont() local 129 auto varTypeface = SkFontMgr::RefDefault()->makeFromStream(typeface->openStream(&ttcIndex), args); in GetVarFont() 310 std::unique_ptr<SkStreamAsset> SkTypeface::openExistingStream(int* ttcIndex) const { in openExistingStream() 312 if (nullptr == ttcIndex) { in openExistingStream() 314 ttcIndex = &ttcIndexStorage; in openExistingStream() 316 return this->onOpenExistingStream(ttcIndex); in openExistingStream() 319 std::unique_ptr<SkStreamAsset> SkTypeface::onOpenExistingStream(int* ttcIndex) const { in onOpenExistingStream() 320 return this->onOpenStream(ttcIndex); in onOpenExistingStream() 372 std::unique_ptr<SkStreamAsset> SkTypeface::openStream(int* ttcIndex) cons [all...] |
H A D | SkFontMgr.cpp | 115 sk_sp<SkTypeface> SkFontMgr::makeFromData(sk_sp<SkData> data, int ttcIndex) const { in makeFromData() 119 return this->onMakeFromData(std::move(data), ttcIndex); in makeFromData() 123 int ttcIndex) const { in makeFromStream() 127 return this->onMakeFromStreamIndex(std::move(stream), ttcIndex); in makeFromStream() 138 sk_sp<SkTypeface> SkFontMgr::makeFromFile(const char path[], int ttcIndex) const { in makeFromFile() 142 return this->onMakeFromFile(path, ttcIndex); in makeFromFile()
|
/third_party/skia/src/pdf/ |
H A D | SkPDFSubsetFont.cpp | 81 int ttcIndex) { 85 HBFace face(hb_face_create(to_blob(std::move(fontData)).get(), ttcIndex)); 116 int ttcIndex) { 130 (void)ttcIndex; 139 int subsetFontSize = SfntlyWrapper::SubsetFont(ttcIndex, 165 int ttcIndex) { 168 return subset_harfbuzz(std::move(fontData), glyphUsage, ttcIndex); 170 return subset_sfntly(std::move(fontData), glyphUsage, fontName, ttcIndex); 181 int ttcIndex) { 182 return subset_sfntly(std::move(fontData), glyphUsage, fontName, ttcIndex); [all...] |
/third_party/skia/src/ports/skia_ohos/ |
H A D | SkTypeface_ohos.cpp | 35 * \param[out] ttcIndex the index of the typeface in a ttc file returned to the caller 38 std::unique_ptr<SkStreamAsset> SkTypeface_OHOS::onOpenStream(int* ttcIndex) const in onOpenStream() 41 if (ttcIndex) { in onOpenStream() 42 *ttcIndex = fontInfo->index; in onOpenStream() 133 int ttcIndex = args.getCollectionIndex(); in onMakeClone() local 134 auto stream = openStream(&ttcIndex); in onMakeClone() 141 if (!fontScanner.scanFont(stream.get(), ttcIndex, &info.familyName, &info.style, in onMakeClone()
|
H A D | SkFontMgr_ohos.cpp | 296 sk_sp<SkTypeface> SkFontMgr_OHOS::onMakeFromData(sk_sp<SkData> data, int ttcIndex) const in onMakeFromData() 303 args.setCollectionIndex(ttcIndex); in onMakeFromData() 315 int ttcIndex) const in onMakeFromStreamIndex() 321 args.setCollectionIndex(ttcIndex); in onMakeFromStreamIndex() 344 * \param ttcIndex the index of typeface in a ttc font file. 0 means none. 349 sk_sp<SkTypeface> SkFontMgr_OHOS::onMakeFromFile(const char path[], int ttcIndex) const in onMakeFromFile() 361 args.setCollectionIndex(ttcIndex); in onMakeFromFile() 429 int ttcIndex = args.getCollectionIndex(); in makeTypeface() local 436 if (!fontScanner.scanFont(stream.get(), ttcIndex, &fontInfo.familyName, &fontInfo.style, in makeTypeface() 443 if (!fontScanner.scanFont(stream.get(), ttcIndex, in makeTypeface() [all...] |
H A D | SkFontMgr_ohos.h | 44 virtual sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override; 46 int ttcIndex) const override; 49 virtual sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override;
|
/third_party/skia/src/ports/ |
H A D | SkFontMgr_custom.cpp | 65 std::unique_ptr<SkStreamAsset> SkTypeface_Stream::onOpenStream(int* ttcIndex) const { in onOpenStream() 66 *ttcIndex = fData->getIndex(); in onOpenStream() 96 std::unique_ptr<SkStreamAsset> SkTypeface_File::onOpenStream(int* ttcIndex) const { in onOpenStream() 97 *ttcIndex = this->getIndex(); in onOpenStream() 226 sk_sp<SkTypeface> SkFontMgr_Custom::onMakeFromData(sk_sp<SkData> data, int ttcIndex) const { 227 return this->makeFromStream(std::make_unique<SkMemoryStream>(std::move(data)), ttcIndex); 231 int ttcIndex) const { 232 return this->makeFromStream(std::move(stream), SkFontArguments().setCollectionIndex(ttcIndex)); 257 sk_sp<SkTypeface> SkFontMgr_Custom::onMakeFromFile(const char path[], int ttcIndex) const { 259 return stream ? this->makeFromStream(std::move(stream), ttcIndex) [all...] |
H A D | SkFontMgr_preview.h | 93 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override 95 *ttcIndex = fIndex; 151 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override 153 *ttcIndex = fData->getIndex(); 201 const int ttcIndex = fontFile.fIndex; in SkFontStyleSet_Preview() local 207 if (!scanner.scanFont(stream.get(), ttcIndex, in SkFontStyleSet_Preview() 251 fStyles.push_back().reset(new SkTypeface_PreviewSystem(pathName, ttcIndex, axisValues.get(), in SkFontStyleSet_Preview() 338 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override; 339 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override; 340 sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset> stream, int ttcIndex) cons [all...] |
H A D | SkFontMgr_android.cpp | 92 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override { 93 *ttcIndex = fIndex; 144 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override { 145 *ttcIndex = fData->getIndex(); 195 const int ttcIndex = fontFile.fIndex; in SkFontStyleSet_Android() local 200 if (!scanner.scanFont(stream.get(), ttcIndex, in SkFontStyleSet_Android() 239 pathName, cacheFontFiles, ttcIndex, axisValues.get(), axisDefinitions.count(), in SkFontStyleSet_Android() 433 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override { 435 ttcIndex); 438 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) cons [all...] |
H A D | SkFontMgr_mac_ct.cpp | 262 static SkUniqueCFRef<CTFontRef> ctfont_from_skdata(sk_sp<SkData> data, int ttcIndex) { in ctfont_from_skdata() argument 264 if (ttcIndex != 0) { in ctfont_from_skdata() 515 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override { 516 if (ttcIndex != 0) { 520 SkUniqueCFRef<CTFontRef> ct = ctfont_from_skdata(data, ttcIndex); 530 int ttcIndex) const override { 531 if (ttcIndex != 0) { 539 SkUniqueCFRef<CTFontRef> ct = ctfont_from_skdata(std::move(data), ttcIndex); 551 int ttcIndex = args.getCollectionIndex(); 552 if (ttcIndex ! [all...] |
H A D | SkFontMgr_FontConfigInterface.cpp | 21 std::unique_ptr<SkStreamAsset> SkTypeface_FCI::onOpenStream(int* ttcIndex) const { in onOpenStream() 22 *ttcIndex = this->getIdentity().fTTCIndex; in onOpenStream() 219 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override { 220 return this->onMakeFromStreamIndex(SkMemoryStream::Make(std::move(data)), ttcIndex); 224 int ttcIndex) const override { 241 auto fontData = std::make_unique<SkFontData>(std::move(stream), ttcIndex, nullptr, 0); 279 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override { 281 return stream ? this->makeFromStream(std::move(stream), ttcIndex) : nullptr;
|
H A D | SkFontMgr_custom.h | 68 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override; 85 std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override; 148 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override; 149 sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset>, int ttcIndex) const override; 151 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override;
|
H A D | SkFontMgr_fuchsia.cpp | 180 uint32_t ttcIndex; member 183 return std::tie(bufferId, ttcIndex) == std::tie(other.bufferId, other.ttcIndex); in operator ==() 227 SkFontArguments().setCollectionIndex(id.ttcIndex), id); in CreateTypefaceFromSkData() 245 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const override; 247 int ttcIndex) const override; 250 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override; 372 sk_sp<SkTypeface> SkFontMgr_Fuchsia::onMakeFromData(sk_sp<SkData>, int ttcIndex) const { in onMakeFromData() 378 int ttcIndex) const { in onMakeFromStreamIndex() 379 return makeFromStream(std::move(asset), SkFontArguments().setCollectionIndex(ttcIndex)); in onMakeFromStreamIndex() [all...] |
H A D | SkFontMgr_preview.cpp | 152 sk_sp<SkTypeface> SkFontMgr_Preview::onMakeFromData(sk_sp<SkData> data, int ttcIndex) const in onMakeFromData() 155 ttcIndex); in onMakeFromData() 158 sk_sp<SkTypeface> SkFontMgr_Preview::onMakeFromFile(const char path[], int ttcIndex) const in onMakeFromFile() 161 return stream.get() ? this->makeFromStream(std::move(stream), ttcIndex) : nullptr; in onMakeFromFile() 164 sk_sp<SkTypeface> SkFontMgr_Preview::onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset> stream, int ttcIndex) const in onMakeFromStreamIndex() 169 if (!fScanner.scanFont(stream.get(), ttcIndex, &name, &style, &isFixedPitch, nullptr)) { in onMakeFromStreamIndex() 172 auto data = std::make_unique<SkFontData>(std::move(stream), ttcIndex, nullptr, 0); in onMakeFromStreamIndex()
|
H A D | SkFontHost_FreeType_common.h | 84 bool scanFont(SkStreamAsset* stream, int ttcIndex, 88 bool GetTypefaceFullname(SkStreamAsset* stream, int ttcIndex, SkByteArray& fullname) const; 99 FT_Face openFace(SkStreamAsset* stream, int ttcIndex, FT_Stream ftStream) const;
|
/third_party/skia/include/core/ |
H A D | SkFontMgr.h | 127 sk_sp<SkTypeface> makeFromData(sk_sp<SkData>, int ttcIndex = 0) const; 134 sk_sp<SkTypeface> makeFromStream(std::unique_ptr<SkStreamAsset>, int ttcIndex = 0) const; 145 sk_sp<SkTypeface> makeFromFile(const char path[], int ttcIndex = 0) const; 202 virtual sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const = 0; 204 int ttcIndex) const = 0; 207 virtual sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const = 0;
|
H A D | SkTypeface.h | 327 * If ttcIndex is not null, it is set to the TrueTypeCollection index 332 std::unique_ptr<SkStreamAsset> openStream(int* ttcIndex) const; 341 std::unique_ptr<SkStreamAsset> openExistingStream(int* ttcIndex) const; 402 virtual std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const = 0; 404 virtual std::unique_ptr<SkStreamAsset> onOpenExistingStream(int* ttcIndex) const;
|
/third_party/skia/src/fonts/ |
H A D | SkFontMgr_indirect.cpp | 154 int ttcIndex) const { in onMakeFromStreamIndex() 155 return fImpl->makeFromStream(std::move(stream), ttcIndex); in onMakeFromStreamIndex() 163 sk_sp<SkTypeface> SkFontMgr_Indirect::onMakeFromFile(const char path[], int ttcIndex) const { in onMakeFromFile() 164 return fImpl->makeFromFile(path, ttcIndex); in onMakeFromFile() 167 sk_sp<SkTypeface> SkFontMgr_Indirect::onMakeFromData(sk_sp<SkData> data, int ttcIndex) const { in onMakeFromData() 168 return fImpl->makeFromData(std::move(data), ttcIndex); in onMakeFromData()
|
/third_party/skia/include/utils/ |
H A D | SkOrderedFontMgr.h | 40 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const override; 42 int ttcIndex) const override; 45 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override;
|
/third_party/skia/src/utils/ |
H A D | SkOrderedFontMgr.cpp | 80 sk_sp<SkTypeface> SkOrderedFontMgr::onMakeFromData(sk_sp<SkData>, int ttcIndex) const { in onMakeFromData() 85 int ttcIndex) const { in onMakeFromStreamIndex() 94 sk_sp<SkTypeface> SkOrderedFontMgr::onMakeFromFile(const char path[], int ttcIndex) const { in onMakeFromFile()
|
/third_party/skia/include/ports/ |
H A D | SkFontMgr_indirect.h | 50 sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset>, int ttcIndex) const override; 53 sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const override; 54 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const override; 91 * This cache is essentially { dataId: { ttcIndex: typeface } }
|
/third_party/skia/tests/ |
H A D | FontHostTest.cpp | 72 static void test_fontstream(skiatest::Reporter* reporter, SkStream* stream, int ttcIndex) { in test_fontstream() argument 73 int n = SkFontStream::GetTableTags(stream, ttcIndex, nullptr); in test_fontstream() 76 int n2 = SkFontStream::GetTableTags(stream, ttcIndex, array.get()); in test_fontstream() 87 SkDebugf("[%d:%d] '%s'\n", ttcIndex, i, str.c_str()); in test_fontstream() 89 size_t size = SkFontStream::GetTableSize(stream, ttcIndex, array[i]); in test_fontstream()
|
/third_party/skia/tools/ |
H A D | Resources.cpp | 58 sk_sp<SkTypeface> MakeResourceAsTypeface(const char* resource, int ttcIndex) { in MakeResourceAsTypeface() argument 59 return SkTypeface::MakeFromStream(GetResourceAsStream(resource), ttcIndex); in MakeResourceAsTypeface()
|