diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llrender/llfontgl.h | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/linden/indra/llrender/llfontgl.h b/linden/indra/llrender/llfontgl.h index 01046af..3f88e62 100644 --- a/linden/indra/llrender/llfontgl.h +++ b/linden/indra/llrender/llfontgl.h | |||
@@ -73,7 +73,7 @@ public: | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | // Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC" | 75 | // Takes a string with potentially several flags, i.e. "NORMAL|BOLD|ITALIC" |
76 | static U8 getStyleFromString(const LLString &style); | 76 | static U8 getStyleFromString(const std::string &style); |
77 | 77 | ||
78 | LLFontGL(); | 78 | LLFontGL(); |
79 | LLFontGL(const LLFontGL &source); | 79 | LLFontGL(const LLFontGL &source); |
@@ -85,24 +85,24 @@ public: | |||
85 | LLFontGL &operator=(const LLFontGL &source); | 85 | LLFontGL &operator=(const LLFontGL &source); |
86 | 86 | ||
87 | static BOOL initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, | 87 | static BOOL initDefaultFonts(F32 screen_dpi, F32 x_scale, F32 y_scale, |
88 | const LLString& monospace_file, F32 monospace_size, | 88 | const std::string& monospace_file, F32 monospace_size, |
89 | const LLString& sansserif_file, | 89 | const std::string& sansserif_file, |
90 | const LLString& sansserif_fallback_file, F32 ss_fallback_scale, | 90 | const std::string& sansserif_fallback_file, F32 ss_fallback_scale, |
91 | F32 small_size, F32 medium_size, F32 large_size, F32 huge_size, | 91 | F32 small_size, F32 medium_size, F32 large_size, F32 huge_size, |
92 | const LLString& sansserif_bold_file, F32 bold_size, | 92 | const std::string& sansserif_bold_file, F32 bold_size, |
93 | const LLString& app_dir = LLString::null); | 93 | const std::string& app_dir = LLStringUtil::null); |
94 | 94 | ||
95 | static void destroyDefaultFonts(); | 95 | static void destroyDefaultFonts(); |
96 | static void destroyGL(); | 96 | static void destroyGL(); |
97 | 97 | ||
98 | static bool loadFaceFallback(LLFontList *fontp, const LLString& fontname, const F32 point_size); | 98 | static bool loadFaceFallback(LLFontList *fontp, const std::string& fontname, const F32 point_size); |
99 | static bool loadFace(LLFontGL *fontp, const LLString& fontname, const F32 point_size, LLFontList *fallback_fontp); | 99 | static bool loadFace(LLFontGL *fontp, const std::string& fontname, const F32 point_size, LLFontList *fallback_fontp); |
100 | /* virtual*/ BOOL loadFace(const std::string& filename, | 100 | /* virtual*/ BOOL loadFace(const std::string& filename, |
101 | const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, | 101 | const F32 point_size, const F32 vert_dpi, const F32 horz_dpi, |
102 | const S32 components, BOOL is_fallback); | 102 | const S32 components, BOOL is_fallback); |
103 | 103 | ||
104 | 104 | ||
105 | S32 renderUTF8(const LLString &text, const S32 begin_offset, | 105 | S32 renderUTF8(const std::string &text, const S32 begin_offset, |
106 | S32 x, S32 y, | 106 | S32 x, S32 y, |
107 | const LLColor4 &color) const | 107 | const LLColor4 &color) const |
108 | { | 108 | { |
@@ -111,7 +111,7 @@ public: | |||
111 | S32_MAX, S32_MAX, NULL, FALSE); | 111 | S32_MAX, S32_MAX, NULL, FALSE); |
112 | } | 112 | } |
113 | 113 | ||
114 | S32 renderUTF8(const LLString &text, const S32 begin_offset, | 114 | S32 renderUTF8(const std::string &text, const S32 begin_offset, |
115 | S32 x, S32 y, | 115 | S32 x, S32 y, |
116 | const LLColor4 &color, | 116 | const LLColor4 &color, |
117 | HAlign halign, VAlign valign, U8 style = NORMAL) const | 117 | HAlign halign, VAlign valign, U8 style = NORMAL) const |
@@ -122,7 +122,7 @@ public: | |||
122 | } | 122 | } |
123 | 123 | ||
124 | // renderUTF8 does a conversion, so is slower! | 124 | // renderUTF8 does a conversion, so is slower! |
125 | S32 renderUTF8(const LLString &text, | 125 | S32 renderUTF8(const std::string &text, |
126 | S32 begin_offset, | 126 | S32 begin_offset, |
127 | F32 x, F32 y, | 127 | F32 x, F32 y, |
128 | const LLColor4 &color, | 128 | const LLColor4 &color, |
@@ -162,14 +162,14 @@ public: | |||
162 | /*virtual*/ F32 getAscenderHeight() const { return (F32)llround(mAscender / sScaleY); } | 162 | /*virtual*/ F32 getAscenderHeight() const { return (F32)llround(mAscender / sScaleY); } |
163 | /*virtual*/ F32 getDescenderHeight() const { return (F32)llround(mDescender / sScaleY); } | 163 | /*virtual*/ F32 getDescenderHeight() const { return (F32)llround(mDescender / sScaleY); } |
164 | 164 | ||
165 | virtual S32 getWidth(const LLString& utf8text) const; | 165 | virtual S32 getWidth(const std::string& utf8text) const; |
166 | virtual S32 getWidth(const llwchar* wchars) const; | 166 | virtual S32 getWidth(const llwchar* wchars) const; |
167 | virtual S32 getWidth(const LLString& utf8text, const S32 offset, const S32 max_chars ) const; | 167 | virtual S32 getWidth(const std::string& utf8text, const S32 offset, const S32 max_chars ) const; |
168 | virtual S32 getWidth(const llwchar* wchars, const S32 offset, const S32 max_chars, BOOL use_embedded = FALSE) const; | 168 | virtual S32 getWidth(const llwchar* wchars, const S32 offset, const S32 max_chars, BOOL use_embedded = FALSE) const; |
169 | 169 | ||
170 | virtual F32 getWidthF32(const LLString& utf8text) const; | 170 | virtual F32 getWidthF32(const std::string& utf8text) const; |
171 | virtual F32 getWidthF32(const llwchar* wchars) const; | 171 | virtual F32 getWidthF32(const llwchar* wchars) const; |
172 | virtual F32 getWidthF32(const LLString& text, const S32 offset, const S32 max_chars ) const; | 172 | virtual F32 getWidthF32(const std::string& text, const S32 offset, const S32 max_chars ) const; |
173 | virtual F32 getWidthF32(const llwchar* wchars, const S32 offset, const S32 max_chars, BOOL use_embedded = FALSE ) const; | 173 | virtual F32 getWidthF32(const llwchar* wchars, const S32 offset, const S32 max_chars, BOOL use_embedded = FALSE ) const; |
174 | 174 | ||
175 | // The following are called often, frequently with large buffers, so do not use a string interface | 175 | // The following are called often, frequently with large buffers, so do not use a string interface |
@@ -191,18 +191,18 @@ public: | |||
191 | 191 | ||
192 | LLImageGL *getImageGL() const; | 192 | LLImageGL *getImageGL() const; |
193 | 193 | ||
194 | void addEmbeddedChar( llwchar wc, LLImageGL* image, const LLString& label); | 194 | void addEmbeddedChar( llwchar wc, LLImageGL* image, const std::string& label); |
195 | void addEmbeddedChar( llwchar wc, LLImageGL* image, const LLWString& label); | 195 | void addEmbeddedChar( llwchar wc, LLImageGL* image, const LLWString& label); |
196 | void removeEmbeddedChar( llwchar wc ); | 196 | void removeEmbeddedChar( llwchar wc ); |
197 | 197 | ||
198 | static LLString nameFromFont(const LLFontGL* fontp); | 198 | static std::string nameFromFont(const LLFontGL* fontp); |
199 | static LLFontGL* fontFromName(const LLString& name); | 199 | static LLFontGL* fontFromName(const std::string& name); |
200 | 200 | ||
201 | static LLString nameFromHAlign(LLFontGL::HAlign align); | 201 | static std::string nameFromHAlign(LLFontGL::HAlign align); |
202 | static LLFontGL::HAlign hAlignFromName(const LLString& name); | 202 | static LLFontGL::HAlign hAlignFromName(const std::string& name); |
203 | 203 | ||
204 | static LLString nameFromVAlign(LLFontGL::VAlign align); | 204 | static std::string nameFromVAlign(LLFontGL::VAlign align); |
205 | static LLFontGL::VAlign vAlignFromName(const LLString& name); | 205 | static LLFontGL::VAlign vAlignFromName(const std::string& name); |
206 | 206 | ||
207 | static void setFontDisplay(BOOL flag) { sDisplayFont = flag ; } | 207 | static void setFontDisplay(BOOL flag) { sDisplayFont = flag ; } |
208 | 208 | ||
@@ -225,7 +225,7 @@ public: | |||
225 | static F32 sScaleX; | 225 | static F32 sScaleX; |
226 | static F32 sScaleY; | 226 | static F32 sScaleY; |
227 | static BOOL sDisplayFont ; | 227 | static BOOL sDisplayFont ; |
228 | static LLString sAppDir; // For loading fonts | 228 | static std::string sAppDir; // For loading fonts |
229 | 229 | ||
230 | static LLFontGL* sMonospace; // medium | 230 | static LLFontGL* sMonospace; // medium |
231 | static LLFontList* sMonospaceFallback; | 231 | static LLFontList* sMonospaceFallback; |
@@ -249,8 +249,8 @@ public: | |||
249 | 249 | ||
250 | protected: | 250 | protected: |
251 | /*virtual*/ BOOL addChar(const llwchar wch); | 251 | /*virtual*/ BOOL addChar(const llwchar wch); |
252 | static LLString getFontPathLocal(); | 252 | static std::string getFontPathLocal(); |
253 | static LLString getFontPathSystem(); | 253 | static std::string getFontPathSystem(); |
254 | 254 | ||
255 | protected: | 255 | protected: |
256 | LLPointer<LLImageRaw> mRawImageGLp; | 256 | LLPointer<LLImageRaw> mRawImageGLp; |