michael@0: michael@0: /* michael@0: * Copyright 2010 The Android Open Source Project michael@0: * michael@0: * Use of this source code is governed by a BSD-style license that can be michael@0: * found in the LICENSE file. michael@0: */ michael@0: michael@0: michael@0: #ifndef SkTextFormatParams_DEFINES michael@0: #define SkTextFormatParams_DEFINES michael@0: michael@0: #include "SkScalar.h" michael@0: #include "SkTypes.h" michael@0: michael@0: // Fraction of the text size to lower a strike through line below the baseline. michael@0: #define kStdStrikeThru_Offset (-SK_Scalar1 * 6 / 21) michael@0: // Fraction of the text size to lower a underline below the baseline. michael@0: #define kStdUnderline_Offset (SK_Scalar1 / 9) michael@0: // Fraction of the text size to use for a strike through or under-line. michael@0: #define kStdUnderline_Thickness (SK_Scalar1 / 18) michael@0: michael@0: // The fraction of text size to embolden fake bold text scales with text size. michael@0: // At 9 points or below, the stroke width is increased by text size / 24. michael@0: // At 36 points and above, it is increased by text size / 32. In between, michael@0: // it is interpolated between those values. michael@0: static const SkScalar kStdFakeBoldInterpKeys[] = { michael@0: SK_Scalar1*9, michael@0: SK_Scalar1*36, michael@0: }; michael@0: static const SkScalar kStdFakeBoldInterpValues[] = { michael@0: SK_Scalar1/24, michael@0: SK_Scalar1/32 michael@0: }; michael@0: SK_COMPILE_ASSERT(SK_ARRAY_COUNT(kStdFakeBoldInterpKeys) == michael@0: SK_ARRAY_COUNT(kStdFakeBoldInterpValues), michael@0: mismatched_array_size); michael@0: static const int kStdFakeBoldInterpLength = michael@0: SK_ARRAY_COUNT(kStdFakeBoldInterpKeys); michael@0: michael@0: #endif //SkTextFormatParams_DEFINES