Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
cf5585cf
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看板
提交
cf5585cf
编写于
5月 19, 2010
作者:
B
Behdad Esfahbod
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add 'head' table
上级
e29caf3f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
144 addition
and
1 deletion
+144
-1
src/Makefile.am
src/Makefile.am
+1
-0
src/hb-font-private.hh
src/hb-font-private.hh
+5
-0
src/hb-font.cc
src/hb-font.cc
+9
-0
src/hb-open-type-private.hh
src/hb-open-type-private.hh
+1
-1
src/hb-ot-head-private.hh
src/hb-ot-head-private.hh
+128
-0
未找到文件。
src/Makefile.am
浏览文件 @
cf5585cf
...
...
@@ -20,6 +20,7 @@ HBSOURCES = \
hb-open-file-private.hh
\
hb-open-type-private.hh
\
hb-language.c
\
hb-ot-head-private.hh
\
hb-private.h
\
hb-shape.cc
\
hb-unicode.c
\
...
...
src/hb-font-private.hh
浏览文件 @
cf5585cf
...
...
@@ -31,6 +31,8 @@
#include "hb-font.h"
#include "hb-ot-head-private.hh"
#include "hb-ot-layout-private.hh"
HB_BEGIN_DECLS
...
...
@@ -64,6 +66,9 @@ struct _hb_face_t {
hb_destroy_func_t
destroy
;
void
*
user_data
;
hb_blob_t
*
head_blob
;
const
struct
head
*
head_table
;
hb_ot_layout_t
ot_layout
;
};
...
...
src/hb-font.cc
浏览文件 @
cf5585cf
...
...
@@ -231,6 +231,9 @@ static hb_face_t _hb_face_nil = {
NULL
,
/* destroy */
NULL
,
/* user_data */
NULL
,
/* head_blob */
NULL
,
/* head_table */
{}
/* ot_layout */
};
...
...
@@ -324,6 +327,9 @@ hb_face_create_for_data (hb_blob_t *blob,
face
->
user_data
=
_hb_face_for_data_closure_create
(
Sanitizer
<
OpenTypeFontFile
>::
sanitize
(
blob
),
index
);
hb_blob_destroy
(
blob
);
face
->
head_blob
=
Sanitizer
<
head
>::
sanitize
(
hb_face_get_table
(
face
,
HB_OT_TAG_head
));
face
->
head_table
=
Sanitizer
<
head
>::
lock_instance
(
face
->
head_blob
);
_hb_ot_layout_init
(
face
);
return
face
;
...
...
@@ -349,6 +355,9 @@ hb_face_destroy (hb_face_t *face)
_hb_ot_layout_fini
(
face
);
hb_blob_unlock
(
face
->
head_blob
);
hb_blob_destroy
(
face
->
head_blob
);
if
(
face
->
destroy
)
face
->
destroy
(
face
->
user_data
);
...
...
src/hb-open-type-private.hh
浏览文件 @
cf5585cf
...
...
@@ -120,7 +120,7 @@ inline Type& StructAfter(TObject &X)
*/
/* Global nul-content Null pool. Enlarge as necessary. */
static
const
void
*
_NullPool
[
16
/
sizeof
(
void
*
)];
static
const
void
*
_NullPool
[
64
/
sizeof
(
void
*
)];
/* Generic nul-content Null objects. */
template
<
typename
Type
>
...
...
src/hb-ot-head-private.hh
0 → 100644
浏览文件 @
cf5585cf
/*
* Copyright (C) 2010 Red Hat, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for any purpose, provided that the
* above copyright notice and the following two paragraphs appear in
* all copies of this software.
*
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
*
* Red Hat Author(s): Behdad Esfahbod
*/
#ifndef HB_OT_HEAD_PRIVATE_HH
#define HB_OT_HEAD_PRIVATE_HH
#include "hb-open-type-private.hh"
/*
* head
*/
#define HB_OT_TAG_head HB_TAG('h','e','a','d')
struct
head
{
static
const
hb_tag_t
Tag
=
HB_OT_TAG_head
;
inline
bool
sanitize
(
hb_sanitize_context_t
*
c
)
{
TRACE_SANITIZE
();
/* Shall we check for magicNumber here? Who cares? */
return
c
->
check_struct
(
this
)
&&
likely
(
version
.
major
==
1
);
}
FixedVersion
version
;
/* Version of the head table--currently
* 0x00010000 for version 1.0. */
FixedVersion
fontRevision
;
/* Set by font manufacturer. */
ULONG
checkSumAdjustment
;
/* To compute: set it to 0, sum the
* entire font as ULONG, then store
* 0xB1B0AFBA - sum. */
ULONG
magicNumber
;
/* Set to 0x5F0F3CF5. */
USHORT
flags
;
/* Bit 0: Baseline for font at y=0;
* Bit 1: Left sidebearing point at x=0;
* Bit 2: Instructions may depend on point size;
* Bit 3: Force ppem to integer values for all
* internal scaler math; may use fractional
* ppem sizes if this bit is clear;
* Bit 4: Instructions may alter advance width
* (the advance widths might not scale linearly);
* Bits 5-10: These should be set according to
* Apple's specification. However, they are not
* implemented in OpenType.
* Bit 5: This bit should be set in fonts that are
* intended to e laid out vertically, and in
* which the glyphs have been drawn such that an
* x-coordinate of 0 corresponds to the desired
* vertical baseline.
* Bit 6: This bit must be set to zero.
* Bit 7: This bit should be set if the font
* requires layout for correct linguistic
* rendering (e.g. Arabic fonts).
* Bit 8: This bit should be set for a GX font
* which has one or more metamorphosis effects
* designated as happening by default.
* Bit 9: This bit should be set if the font
* contains any strong right-to-left glyphs.
* Bit 10: This bit should be set if the font
* contains Indic-style rearrangement effects.
* Bit 11: Font data is 'lossless,' as a result
* of having been compressed and decompressed
* with the Agfa MicroType Express engine.
* Bit 12: Font converted (produce compatible metrics)
* Bit 13: Font optimized for ClearType™.
* Note, fonts that rely on embedded bitmaps (EBDT)
* for rendering should not be considered optimized
* for ClearType, and therefore should keep this bit
* cleared.
* Bit 14: Reserved, set to 0
* Bit 15: Reserved, set to 0. */
USHORT
unitsPerEm
;
/* Valid range is from 16 to 16384. This value
* should be a power of 2 for fonts that have
* TrueType outlines. */
LONGDATETIME
created
;
/* Number of seconds since 12:00 midnight,
January 1, 1904. 64-bit integer */
LONGDATETIME
modified
;
/* Number of seconds since 12:00 midnight,
January 1, 1904. 64-bit integer */
SHORT
xMin
;
/* For all glyph bounding boxes. */
SHORT
yMin
;
/* For all glyph bounding boxes. */
SHORT
xMax
;
/* For all glyph bounding boxes. */
SHORT
yMax
;
/* For all glyph bounding boxes. */
USHORT
macStyle
;
/* Bit 0: Bold (if set to 1);
* Bit 1: Italic (if set to 1)
* Bit 2: Underline (if set to 1)
* Bit 3: Outline (if set to 1)
* Bit 4: Shadow (if set to 1)
* Bit 5: Condensed (if set to 1)
* Bit 6: Extended (if set to 1)
* Bits 7-15: Reserved (set to 0). */
USHORT
lowestRecPPEM
;
/* Smallest readable size in pixels. */
SHORT
fontDirectionHint
;
/* Deprecated (Set to 2).
* 0: Fully mixed directional glyphs;
* 1: Only strongly left to right;
* 2: Like 1 but also contains neutrals;
* -1: Only strongly right to left;
* -2: Like -1 but also contains neutrals. */
SHORT
indexToLocFormat
;
/* 0 for short offsets, 1 for long. */
SHORT
glyphDataFormat
;
/* 0 for current format. */
public:
DEFINE_SIZE_STATIC
(
54
);
};
#endif
/* HB_OT_HEAD_PRIVATE_HH */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录