aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJacek Antonelli2010-09-23 19:35:15 -0500
committerMcCabe Maxsted2010-10-08 23:08:55 -0700
commiteec7b1cd20163e0310b63cfb82175d1db73df300 (patch)
treecb76a081271f292fcea313542e18fe2edf34adce
parentMerge remote branch 'aleric/weekly' into weekly (diff)
downloadmeta-impy-eec7b1cd20163e0310b63cfb82175d1db73df300.zip
meta-impy-eec7b1cd20163e0310b63cfb82175d1db73df300.tar.gz
meta-impy-eec7b1cd20163e0310b63cfb82175d1db73df300.tar.bz2
meta-impy-eec7b1cd20163e0310b63cfb82175d1db73df300.tar.xz
Use integer font sizes to avoid blurriness on some systems.
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llfontregistry.cpp5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/fonts.xml10
2 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/llrender/llfontregistry.cpp b/linden/indra/llrender/llfontregistry.cpp
index b1d8c5c..2140dbd 100644
--- a/linden/indra/llrender/llfontregistry.cpp
+++ b/linden/indra/llrender/llfontregistry.cpp
@@ -442,12 +442,13 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc)
442 std::string font_path = local_path + *file_name_it; 442 std::string font_path = local_path + *file_name_it;
443 BOOL is_fallback = !is_first_found; 443 BOOL is_fallback = !is_first_found;
444 F32 size_mult = (is_fallback ? 1 : match_desc->getSizeMult()); 444 F32 size_mult = (is_fallback ? 1 : match_desc->getSizeMult());
445 if (!fontp->loadFace(font_path, point_size * size_mult, 445 F32 size = (F32)llround(point_size * size_mult);
446 if (!fontp->loadFace(font_path, size,
446 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) 447 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback))
447 { 448 {
448 font_path = sys_path + *file_name_it; 449 font_path = sys_path + *file_name_it;
449 450
450 if (!fontp->loadFace(font_path, point_size * size_mult, 451 if (!fontp->loadFace(font_path, size,
451 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) 452 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback))
452 { 453 {
453 LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << LL_ENDL; 454 LL_INFOS_ONCE("LLFontRegistry") << "Couldn't load font " << *file_name_it << LL_ENDL;
diff --git a/linden/indra/newview/skins/default/xui/en-us/fonts.xml b/linden/indra/newview/skins/default/xui/en-us/fonts.xml
index 15a8254..5564079 100644
--- a/linden/indra/newview/skins/default/xui/en-us/fonts.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/fonts.xml
@@ -137,23 +137,23 @@
137 137
138 <font_size name="Monospace" 138 <font_size name="Monospace"
139 comment="Size for monospaced font (points, or 1/72 of an inch)" 139 comment="Size for monospaced font (points, or 1/72 of an inch)"
140 size="9.0" 140 size="9"
141 /> 141 />
142 <font_size name="Huge" 142 <font_size name="Huge"
143 comment="Size of huge font (points, or 1/72 of an inch)" 143 comment="Size of huge font (points, or 1/72 of an inch)"
144 size="15.2" 144 size="15"
145 /> 145 />
146 <font_size name="Large" 146 <font_size name="Large"
147 comment="Size of large font (points, or 1/72 of an inch)" 147 comment="Size of large font (points, or 1/72 of an inch)"
148 size="11.5" 148 size="12"
149 /> 149 />
150 <font_size name="Medium" 150 <font_size name="Medium"
151 comment="Size of medium font (points, or 1/72 of an inch)" 151 comment="Size of medium font (points, or 1/72 of an inch)"
152 size="9.5" 152 size="10"
153 /> 153 />
154 <font_size name="Small" 154 <font_size name="Small"
155 comment="Size of small font (points, or 1/72 of an inch)" 155 comment="Size of small font (points, or 1/72 of an inch)"
156 size="8.5" 156 size="8"
157 /> 157 />
158</fonts> 158</fonts>
159 159