Chromium Code Reviews| Index: include/core/SkPaint.h |
| diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h |
| index abb859950c5bb6a66aecccded690ca8cd6ae02a2..5b0addf126cd4bd82bd0625152edae0f576cea94 100644 |
| --- a/include/core/SkPaint.h |
| +++ b/include/core/SkPaint.h |
| @@ -731,6 +731,15 @@ public: |
| void setTextEncoding(TextEncoding encoding); |
| struct FontMetrics { |
| + /** Describes defined to identify which values are unknown, later can be |
|
bungeman-skia
2014/02/17 19:10:06
nit: this comment needs to be un-indented
This co
h.joshi
2014/02/18 05:48:48
Okey, will make suggested changes
On 2014/02/17 1
|
| + used for other uses |
| + */ |
| + enum FontMetricsFlags { |
| + kUnderlineThinknessIsValid_FontMetricFlag = 0x01, |
| + kUnderlinePositionIsValid_FontMetricsflag = 1 << 1, |
| + }; |
| + |
| + uint32_t fFontMetricsFlag; //!< Bit field to identify which values are unknown |
| SkScalar fTop; //!< The greatest distance above the baseline for any glyph (will be <= 0) |
| SkScalar fAscent; //!< The recommended distance above the baseline (will be <= 0) |
| SkScalar fDescent; //!< The recommended distance below the baseline (will be >= 0) |
| @@ -742,8 +751,17 @@ public: |
| SkScalar fXMax; //!< The maximum bounding box x value for all glyphs |
| SkScalar fXHeight; //!< The height of an 'x' in px, or 0 if no 'x' in face |
| SkScalar fCapHeight; //!< The cap height (> 0), or 0 if cannot be determined. |
| + SkScalar fUnderlineThickness; //!< underline thickness, or 0 if cannot be determined |
| + SkScalar fUnderlinePosition; //!< underline position, or 0 if cannot be determined |
| }; |
| + /** Method to get bit set for Font Metrics |
| + @param fObject Pointer of FontMetrics object |
| + @param bitSet bit whose value we want to know is set or not |
| + @param retrun true if FontMetrics bit i set false otherwise |
| + */ |
| + bool isFontMetricsFlagSet(FontMetrics * fObject, FontMetrics::FontMetricsFlags bitSet) const; |
|
bungeman-skia
2014/02/17 19:10:06
This seems like a really odd public interface to h
h.joshi
2014/02/18 05:48:48
Pls suggest should I move method inside FontMetric
|
| + |
| /** Return the recommend spacing between lines (which will be |
| fDescent - fAscent + fLeading). |
| If metrics is not null, return in it the font metrics for the |