| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/gfx/font_utils.h" | 5 #include "base/gfx/font_utils.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/gfx/uniscribe.h" | 10 #include "base/gfx/uniscribe.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 if (!family) { | 252 if (!family) { |
| 253 int plane = ucs4 >> 16; | 253 int plane = ucs4 >> 16; |
| 254 switch (plane) { | 254 switch (plane) { |
| 255 case 1: | 255 case 1: |
| 256 family = L"code2001"; | 256 family = L"code2001"; |
| 257 break; | 257 break; |
| 258 case 2: | 258 case 2: |
| 259 family = L"simsun-extb"; | 259 family = L"simsun-extb"; |
| 260 break; | 260 break; |
| 261 default: | 261 default: |
| 262 family = L"arial unicode ms"; | 262 family = L"lucida sans unicode"; |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 | 265 |
| 266 if (char_checked) *char_checked = ucs4; | 266 if (char_checked) *char_checked = ucs4; |
| 267 if (script_checked) *script_checked = script; | 267 if (script_checked) *script_checked = script; |
| 268 return family; | 268 return family; |
| 269 } | 269 } |
| 270 | 270 |
| 271 | 271 |
| 272 | 272 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 NOTREACHED(); | 327 NOTREACHED(); |
| 328 return FONT_STYLE_NORMAL; | 328 return FONT_STYLE_NORMAL; |
| 329 } | 329 } |
| 330 return (logfont->lfItalic ? FONT_STYLE_ITALIC : FONT_STYLE_NORMAL) | | 330 return (logfont->lfItalic ? FONT_STYLE_ITALIC : FONT_STYLE_NORMAL) | |
| 331 (logfont->lfUnderline ? FONT_STYLE_UNDERLINED : FONT_STYLE_NORMAL) | | 331 (logfont->lfUnderline ? FONT_STYLE_UNDERLINED : FONT_STYLE_NORMAL) | |
| 332 (logfont->lfWeight >= 700 ? FONT_STYLE_BOLD : FONT_STYLE_NORMAL); | 332 (logfont->lfWeight >= 700 ? FONT_STYLE_BOLD : FONT_STYLE_NORMAL); |
| 333 } | 333 } |
| 334 | 334 |
| 335 } // namespace gfx | 335 } // namespace gfx |
| 336 | 336 |
| OLD | NEW |