| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. | 5 * Copyright (C) 2003, 2006, 2010, 2011 Apple Inc. All rights reserved. |
| 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. | 6 * Copyright (c) 2007, 2008, 2010 Google Inc. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 return; | 239 return; |
| 240 | 240 |
| 241 ShapeResultBloberizer bloberizer(*this, device_scale_factor); | 241 ShapeResultBloberizer bloberizer(*this, device_scale_factor); |
| 242 CachingWordShaper word_shaper(*this); | 242 CachingWordShaper word_shaper(*this); |
| 243 ShapeResultBuffer buffer; | 243 ShapeResultBuffer buffer; |
| 244 word_shaper.FillResultBuffer(run_info, &buffer); | 244 word_shaper.FillResultBuffer(run_info, &buffer); |
| 245 bloberizer.FillTextEmphasisGlyphs(run_info, emphasis_glyph_data, buffer); | 245 bloberizer.FillTextEmphasisGlyphs(run_info, emphasis_glyph_data, buffer); |
| 246 DrawBlobs(canvas, flags, bloberizer.Blobs(), point); | 246 DrawBlobs(canvas, flags, bloberizer.Blobs(), point); |
| 247 } | 247 } |
| 248 | 248 |
| 249 void Font::DrawEmphasisMarks(PaintCanvas* canvas, |
| 250 const TextFragmentPaintInfo& text_info, |
| 251 const AtomicString& mark, |
| 252 const FloatPoint& point, |
| 253 float device_scale_factor, |
| 254 const PaintFlags& flags) const { |
| 255 if (ShouldSkipDrawing()) |
| 256 return; |
| 257 |
| 258 FontCachePurgePreventer purge_preventer; |
| 259 const auto emphasis_glyph_data = GetEmphasisMarkGlyphData(mark); |
| 260 if (!emphasis_glyph_data.font_data) |
| 261 return; |
| 262 |
| 263 ShapeResultBloberizer bloberizer(*this, device_scale_factor); |
| 264 bloberizer.FillTextEmphasisGlyphs( |
| 265 text_info.text, text_info.direction, text_info.from, text_info.to, |
| 266 emphasis_glyph_data, text_info.shape_result); |
| 267 DrawBlobs(canvas, flags, bloberizer.Blobs(), point); |
| 268 } |
| 269 |
| 249 float Font::Width(const TextRun& run, | 270 float Font::Width(const TextRun& run, |
| 250 HashSet<const SimpleFontData*>* fallback_fonts, | 271 HashSet<const SimpleFontData*>* fallback_fonts, |
| 251 FloatRect* glyph_bounds) const { | 272 FloatRect* glyph_bounds) const { |
| 252 FontCachePurgePreventer purge_preventer; | 273 FontCachePurgePreventer purge_preventer; |
| 253 CachingWordShaper shaper(*this); | 274 CachingWordShaper shaper(*this); |
| 254 return shaper.Width(run, fallback_fonts, glyph_bounds); | 275 return shaper.Width(run, fallback_fonts, glyph_bounds); |
| 255 } | 276 } |
| 256 | 277 |
| 257 static int GetInterceptsFromBlobs( | 278 static int GetInterceptsFromBlobs( |
| 258 const ShapeResultBloberizer::BlobBuffer& blobs, | 279 const ShapeResultBloberizer::BlobBuffer& blobs, |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 469 |
| 449 bool Font::LoadingCustomFonts() const { | 470 bool Font::LoadingCustomFonts() const { |
| 450 return font_fallback_list_ && font_fallback_list_->LoadingCustomFonts(); | 471 return font_fallback_list_ && font_fallback_list_->LoadingCustomFonts(); |
| 451 } | 472 } |
| 452 | 473 |
| 453 bool Font::IsFallbackValid() const { | 474 bool Font::IsFallbackValid() const { |
| 454 return !font_fallback_list_ || font_fallback_list_->IsValid(); | 475 return !font_fallback_list_ || font_fallback_list_->IsValid(); |
| 455 } | 476 } |
| 456 | 477 |
| 457 } // namespace blink | 478 } // namespace blink |
| OLD | NEW |