2 * Copyright (C) 2013 The Android Open Source Project
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef ANDROID_GRAPHICS_PAINT_H_
18 #define ANDROID_GRAPHICS_PAINT_H_
23 #include <minikin/FontFamily.h>
27 class Paint : public SkPaint {
30 Paint(const Paint& paint);
33 Paint& operator=(const Paint& other);
35 friend bool operator==(const Paint& a, const Paint& b);
36 friend bool operator!=(const Paint& a, const Paint& b) {
40 void setLetterSpacing(float letterSpacing) {
41 mLetterSpacing = letterSpacing;
44 float getLetterSpacing() const {
45 return mLetterSpacing;
48 void setFontFeatureSettings(const std::string &fontFeatureSettings) {
49 mFontFeatureSettings = fontFeatureSettings;
52 std::string getFontFeatureSettings() const {
53 return mFontFeatureSettings;
56 void setTextLocales(const std::string &textLocales) {
57 mTextLocales = textLocales;
60 const std::string& getTextLocales() const {
64 void setFontVariant(FontVariant variant) {
65 mFontVariant = variant;
68 FontVariant getFontVariant() const {
72 void setHyphenEdit(uint32_t hyphen) {
76 uint32_t getHyphenEdit() const {
81 float mLetterSpacing = 0;
82 std::string mFontFeatureSettings;
83 std::string mTextLocales;
84 FontVariant mFontVariant;
85 uint32_t mHyphenEdit = 0;
88 } // namespace android
90 #endif // ANDROID_GRAPHICS_PAINT_H_