Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
cb3fa70c
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
1 年多 前同步成功
通知
0
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
cb3fa70c
编写于
4月 11, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
4月 11, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[dwrite] Cosmetic change (#963)
上级
09d5e546
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
22 addition
and
22 deletion
+22
-22
src/hb-directwrite.cc
src/hb-directwrite.cc
+19
-20
src/hb-directwrite.h
src/hb-directwrite.h
+3
-2
未找到文件。
src/hb-directwrite.cc
浏览文件 @
cb3fa70c
/*
/*
* Copyright © 2015-2018 Ebrahim Byagowi
*
* This is part of HarfBuzz, a text shaping library.
...
...
@@ -304,8 +304,8 @@ public:
inline
bool
ContainsTextPosition
(
uint32_t
aTextPosition
)
const
{
return
aTextPosition
>=
mTextStart
&&
aTextPosition
<
mTextStart
+
mTextLength
;
return
aTextPosition
>=
mTextStart
&&
aTextPosition
<
mTextStart
+
mTextLength
;
}
Run
*
nextRun
;
...
...
@@ -485,11 +485,10 @@ protected:
for
(
Run
*
run
=
&
mRunHead
;
run
;
run
=
run
->
nextRun
)
if
(
run
->
ContainsTextPosition
(
textPosition
))
{
mCurrentRun
=
run
;
return
;
mCurrentRun
=
run
;
return
;
}
//NS_NOTREACHED ("We should always be able to find the text position in one \
// of our runs");
// NS_NOTREACHED ("We should always be able to find the text position in one of our runs");
}
void
SplitCurrentRun
(
uint32_t
splitPosition
)
...
...
@@ -655,7 +654,7 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan,
for
(
unsigned
int
i
=
0
;
i
<
num_features
;
++
i
)
{
typographic_features
.
features
[
i
].
nameTag
=
(
DWRITE_FONT_FEATURE_TAG
)
hb_uint32_swap
(
features
[
i
].
tag
);
hb_uint32_swap
(
features
[
i
].
tag
);
typographic_features
.
features
[
i
].
parameter
=
features
[
i
].
value
;
}
}
...
...
@@ -760,27 +759,27 @@ retry_getglyphs:
uint16_t
*
modifiedGlyphIndices
=
new
uint16_t
[
maxGlyphCount
];
float
*
modifiedGlyphAdvances
=
new
float
[
maxGlyphCount
];
DWRITE_GLYPH_OFFSET
*
modifiedGlyphOffsets
=
new
DWRITE_GLYPH_OFFSET
[
maxGlyphCount
];
new
DWRITE_GLYPH_OFFSET
[
maxGlyphCount
];
uint32_t
actualGlyphsCount
;
hr
=
analyzer1
->
GetJustifiedGlyphs
(
fontFace
,
fontEmSize
,
runHead
->
mScript
,
textLength
,
glyphCount
,
maxGlyphCount
,
clusterMap
,
glyphIndices
,
glyphAdvances
,
justifiedGlyphAdvances
,
justifiedGlyphOffsets
,
glyphProperties
,
&
actualGlyphsCount
,
modifiedClusterMap
,
modifiedGlyphIndices
,
modifiedGlyphAdvances
,
modifiedGlyphOffsets
);
textLength
,
glyphCount
,
maxGlyphCount
,
clusterMap
,
glyphIndices
,
glyphAdvances
,
justifiedGlyphAdvances
,
justifiedGlyphOffsets
,
glyphProperties
,
&
actualGlyphsCount
,
modifiedClusterMap
,
modifiedGlyphIndices
,
modifiedGlyphAdvances
,
modifiedGlyphOffsets
);
if
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
))
{
maxGlyphCount
=
actualGlyphsCount
;
delete
[]
modifiedGlyphIndices
;
delete
[]
modifiedGlyphAdvances
;
delete
[]
modifiedGlyphOffsets
;
maxGlyphCount
=
actualGlyphsCount
;
delete
[]
modifiedGlyphIndices
;
delete
[]
modifiedGlyphAdvances
;
delete
[]
modifiedGlyphOffsets
;
maxGlyphCount
=
actualGlyphsCount
;
maxGlyphCount
=
actualGlyphsCount
;
goto
retry_getjustifiedglyphs
;
goto
retry_getjustifiedglyphs
;
}
if
(
FAILED
(
hr
))
FAIL
(
"Analyzer failed to get justified glyphs."
);
FAIL
(
"Analyzer failed to get justified glyphs."
);
delete
[]
clusterMap
;
delete
[]
glyphIndices
;
...
...
src/hb-directwrite.h
浏览文件 @
cb3fa70c
...
...
@@ -30,8 +30,9 @@
HB_BEGIN_DECLS
HB_EXTERN
hb_bool_t
hb_directwrite_shape_experimental_width
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
,
const
hb_feature_t
*
features
,
unsigned
int
num_features
,
float
width
);
hb_directwrite_shape_experimental_width
(
hb_font_t
*
font
,
hb_buffer_t
*
buffer
,
const
hb_feature_t
*
features
,
unsigned
int
num_features
,
float
width
);
HB_END_DECLS
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录