Skip to content

Commit

Permalink
* 修复生成pdf和打印的时候,加粗字体未被加粗的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
weolar committed Nov 19, 2020
1 parent 0ae88cf commit 93c493c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/skia/src/pdf/SkPDFDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static void emit_pdf_color(SkColor color, SkWStream* result) {

static SkPaint calculate_text_paint(const SkPaint& paint) {
SkPaint result = paint;
if (result.isFakeBoldText()) {
if (result.isFakeBoldText() || (result.getTypeface() && result.getTypeface()->isBold())) {
SkScalar fakeBoldScale = SkScalarInterpFunc(result.getTextSize(),
kStdFakeBoldInterpKeys,
kStdFakeBoldInterpValues,
Expand Down

0 comments on commit 93c493c

Please sign in to comment.