Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
原因是js用了FaceFont然后传字体数据,此时会在BinaryDataFontFaceSource::createFontData里创建自定义字体。而此字体在 SkScalerContext_GDI::SkScalerContext_GDI里通过CreateFontIndirect创建的fTM.tmMaxCharWidth是0,从而在 Font::drawText->SkCanvas::drawPosTextH->SkRecorder::onDrawPosTextH里传给了 SkRecordDraw.cpp:AdjustTextForFontMetrics, 导致了断言错误。 chromium没出现这断言的原因是Font::drawGlyphBuffer走drawTextBlob通路了,没调用到 SkRecorder::onDrawPosTextH 所以这次我独立做了个修复,如果创建自定义字体的tmMaxCharWidth是0,就赋值为tmAveCharWidth
- Loading branch information