Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
de4c501d
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
de4c501d
编写于
1月 14, 2011
作者:
P
prr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6930980: Disable TrueType hinting for fonts known not to hint well
Reviewed-by: igor, jgodinez
上级
2edeb643
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
6 deletion
+25
-6
src/share/classes/sun/font/FileFontStrike.java
src/share/classes/sun/font/FileFontStrike.java
+18
-1
src/share/classes/sun/font/FontScaler.java
src/share/classes/sun/font/FontScaler.java
+4
-3
src/share/classes/sun/font/FreetypeFontScaler.java
src/share/classes/sun/font/FreetypeFontScaler.java
+2
-1
src/share/classes/sun/font/NullFontScaler.java
src/share/classes/sun/font/NullFontScaler.java
+1
-1
未找到文件。
src/share/classes/sun/font/FileFontStrike.java
浏览文件 @
de4c501d
...
@@ -151,6 +151,23 @@ public class FileFontStrike extends PhysicalStrike {
...
@@ -151,6 +151,23 @@ public class FileFontStrike extends PhysicalStrike {
}
}
}
}
/* Amble fonts are better rendered unhinted although there's the
* inevitable fuzziness that accompanies this due to no longer
* snapping stems to the pixel grid. The exception is that in B&W
* mode they are worse without hinting. The down side to that is that
* B&W metrics will differ which normally isn't the case, although
* since AA mode is part of the measuring context that should be OK.
* We don't expect Amble to be installed in the Windows fonts folder.
* If we were to, then we'd also might want to disable using the
* native rasteriser path which is used for LCD mode for platform
* fonts. since we have no way to disable hinting by GDI.
* In the case of Amble, since its 'gasp' table says to disable
* hinting, I'd expect GDI to follow that, so likely it should
* all be consistent even if GDI used.
*/
boolean
disableHinting
=
desc
.
aaHint
!=
INTVAL_TEXT_ANTIALIAS_OFF
&&
fileFont
.
familyName
.
startsWith
(
"Amble"
);
/* If any of the values is NaN then substitute the null scaler context.
/* If any of the values is NaN then substitute the null scaler context.
* This will return null images, zero advance, and empty outlines
* This will return null images, zero advance, and empty outlines
* as no rendering need take place in this case.
* as no rendering need take place in this case.
...
@@ -165,7 +182,7 @@ public class FileFontStrike extends PhysicalStrike {
...
@@ -165,7 +182,7 @@ public class FileFontStrike extends PhysicalStrike {
pScalerContext
=
fileFont
.
getScaler
().
createScalerContext
(
matrix
,
pScalerContext
=
fileFont
.
getScaler
().
createScalerContext
(
matrix
,
fileFont
instanceof
TrueTypeFont
,
fileFont
instanceof
TrueTypeFont
,
desc
.
aaHint
,
desc
.
fmHint
,
desc
.
aaHint
,
desc
.
fmHint
,
boldness
,
italic
);
boldness
,
italic
,
disableHinting
);
}
}
mapper
=
fileFont
.
getMapper
();
mapper
=
fileFont
.
getMapper
();
...
...
src/share/classes/sun/font/FontScaler.java
浏览文件 @
de4c501d
...
@@ -242,9 +242,10 @@ public abstract class FontScaler implements DisposerRecord {
...
@@ -242,9 +242,10 @@ public abstract class FontScaler implements DisposerRecord {
freed when corresponding strike is being released.
freed when corresponding strike is being released.
*/
*/
abstract
long
createScalerContext
(
double
[]
matrix
,
abstract
long
createScalerContext
(
double
[]
matrix
,
boolean
fontType
,
boolean
fontType
,
int
aa
,
int
fm
,
int
aa
,
int
fm
,
float
boldness
,
float
italic
);
float
boldness
,
float
italic
,
boolean
disableHinting
);
/* Marks context as invalid because native scaler is invalid.
/* Marks context as invalid because native scaler is invalid.
Notes:
Notes:
...
...
src/share/classes/sun/font/FreetypeFontScaler.java
浏览文件 @
de4c501d
...
@@ -211,7 +211,8 @@ class FreetypeFontScaler extends FontScaler {
...
@@ -211,7 +211,8 @@ class FreetypeFontScaler extends FontScaler {
}
}
long
createScalerContext
(
double
[]
matrix
,
boolean
fontType
,
long
createScalerContext
(
double
[]
matrix
,
boolean
fontType
,
int
aa
,
int
fm
,
float
boldness
,
float
italic
)
{
int
aa
,
int
fm
,
float
boldness
,
float
italic
,
boolean
disableHinting
)
{
if
(
nativeScaler
!=
0L
)
{
if
(
nativeScaler
!=
0L
)
{
return
createScalerContextNative
(
nativeScaler
,
matrix
,
return
createScalerContextNative
(
nativeScaler
,
matrix
,
fontType
,
aa
,
fm
,
boldness
,
italic
);
fontType
,
aa
,
fm
,
boldness
,
italic
);
...
...
src/share/classes/sun/font/NullFontScaler.java
浏览文件 @
de4c501d
...
@@ -67,7 +67,7 @@ class NullFontScaler extends FontScaler {
...
@@ -67,7 +67,7 @@ class NullFontScaler extends FontScaler {
long
getLayoutTableCache
()
{
return
0L
;}
long
getLayoutTableCache
()
{
return
0L
;}
long
createScalerContext
(
double
[]
matrix
,
boolean
fontType
,
int
aa
,
long
createScalerContext
(
double
[]
matrix
,
boolean
fontType
,
int
aa
,
int
fm
,
float
boldness
,
float
italic
)
{
int
fm
,
float
boldness
,
float
italic
,
boolean
disableHinting
)
{
return
getNullScalerContext
();
return
getNullScalerContext
();
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录