Portable fonts don't have streams, so expect the stream open
to fail.
R=bungeman@google.com
TBR=cdalton@nvidia.com
Review URL: https://codereview.chromium.org/
1185803003
uint32_t glyphIDsCount) const override;
SkStreamAsset* onOpenStream(int* ttcIndex) const override {
- SkASSERT(0); // don't expect to get here
return NULL;
}
}
int faceIndex;
- SkAutoTDelete<SkStream> fontStream(typeface->openStream(&faceIndex));
+ SkStreamAsset* asset = typeface->openStream(&faceIndex);
+ if (!asset) {
+ return GrPathRendering::createGlyphs(typeface, NULL, stroke);
+ }
+ SkAutoTDelete<SkStream> fontStream(asset);
const size_t fontDataLength = fontStream->getLength();
if (0 == fontDataLength) {