Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1603)

Unified Diff: Source/platform/fonts/Font.h

Issue 1153173011: Force glyph overflow calculation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More rebaselines Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/fonts/Character.cpp ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/Font.h
diff --git a/Source/platform/fonts/Font.h b/Source/platform/fonts/Font.h
index 931ca6cef56d8cb9e2f716ca52e43e3b50abed5a..22afbdd82df688d2836cac42b3fa8eab8cf4c430 100644
--- a/Source/platform/fonts/Font.h
+++ b/Source/platform/fonts/Font.h
@@ -76,6 +76,10 @@ struct GlyphOverflow {
return !left && !right && !top && !bottom;
}
+ // If computeBounds, top and bottom are the maximum heights of the glyphs above and below the baseline, respectively.
+ // Otherwise they are the amounts of glyph overflows exceeding the font metrics' ascent and descent, respectively.
+ // Left and right are the amounts of glyph overflows exceeding the left and right edge of normal layout boundary, respectively.
+ // All fields are in absolute number of pixels rounded up to the nearest integer.
int left;
int right;
int top;
@@ -139,13 +143,13 @@ private:
const FloatPoint&, const FloatRect& textRect, float deviceScaleFactor) const;
void drawTextBlob(SkCanvas*, const SkPaint&, const SkTextBlob*, const SkPoint& origin) const;
void drawGlyphBuffer(SkCanvas*, const SkPaint&, const TextRunPaintInfo&, const GlyphBuffer&, const FloatPoint&, float deviceScaleFactor) const;
- float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, IntRectOutsets* glyphBounds = 0) const;
+ float floatWidthForSimpleText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts = 0, FloatRectOutsets* glyphBounds = 0) const;
int offsetForPositionForSimpleText(const TextRun&, float position, bool includePartialGlyphs) const;
FloatRect selectionRectForSimpleText(const TextRun&, const FloatPoint&, int h, int from, int to, bool accountForGlyphBounds) const;
bool getEmphasisMarkGlyphData(const AtomicString&, GlyphData&) const;
- float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts, IntRectOutsets* glyphBounds) const;
+ float floatWidthForComplexText(const TextRun&, HashSet<const SimpleFontData*>* fallbackFonts, FloatRectOutsets* glyphBounds) const;
int offsetForPositionForComplexText(const TextRun&, float position, bool includePartialGlyphs) const;
FloatRect selectionRectForComplexText(const TextRun&, const FloatPoint&, int h, int from, int to) const;
« no previous file with comments | « Source/platform/fonts/Character.cpp ('k') | Source/platform/fonts/Font.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698