Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
3f74b7a1
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看板
提交
3f74b7a1
编写于
4月 14, 2019
作者:
N
Nathan Willis
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Docs: Regularize GTK-Doc comments for hb-ot-color.
上级
35f3b97f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
80 addition
and
62 deletion
+80
-62
src/hb-ot-color.cc
src/hb-ot-color.cc
+77
-59
src/hb-ot-color.h
src/hb-ot-color.h
+3
-3
未找到文件。
src/hb-ot-color.cc
浏览文件 @
3f74b7a1
...
...
@@ -47,6 +47,8 @@
* @include: hb-ot.h
*
* Functions for fetching color-font information from OpenType font faces.
*
* HarfBuzz supports COLR/CPAL, sbix, CBDT, and SVG color fonts.
**/
...
...
@@ -57,9 +59,11 @@
/**
* hb_ot_color_has_palettes:
* @face: a font face.
* @face: #hb_face_t to work upon
*
* Tests whether a face includes a CPAL color-palette table.
*
* Return
s: whether CPAL table is available.
* Return
value: true if data found, false otherwise
*
* Since: 2.1.0
*/
...
...
@@ -71,10 +75,11 @@ hb_ot_color_has_palettes (hb_face_t *face)
/**
* hb_ot_color_palette_get_count:
* @face: a font face.
* @face: #hb_face_t to work upon
*
* Fetches the number of color palettes in a face.
*
* Returns: the number of color palettes in @face, or zero if @face has
* no colors.
* Return value: the number of palettes found
*
* Since: 2.1.0
*/
...
...
@@ -86,13 +91,16 @@ hb_ot_color_palette_get_count (hb_face_t *face)
/**
* hb_ot_color_palette_get_name_id:
* @face:
a font face.
* @palette_index:
the index of the color palette whose name is being requested.
* @face:
#hb_face_t to work upon
* @palette_index:
The index of the color palette
*
*
Retrieves the name id of a color palette. For example, a color font can
*
have themed palettes like "Spring", "Summer", "Fall", and "Winter".
*
Fetches the 'name' table Name ID that provides display names for
*
a CPAL color palette.
*
* Returns: an identifier within @face's `name` table.
* Palette display names can be generic (e.g., "Default") or provide
* specific, themed names (e.g., "Spring", "Summer", "Fall", and "Winter").
*
* Return value: the Named ID found for the palette.
* If the requested palette has no name the result is #HB_OT_NAME_ID_INVALID.
*
* Since: 2.1.0
...
...
@@ -106,10 +114,16 @@ hb_ot_color_palette_get_name_id (hb_face_t *face,
/**
* hb_ot_color_palette_color_get_name_id:
* @face: a font face.
* @color_index: palette entry index.
* @face: #hb_face_t to work upon
* @color_index: The index of the color
*
* Fetches the 'name' table Name ID that provides display names for
* the specificed color in a face's CPAL color palette.
*
* Display names can be generic (e.g., "Background") or specific
* (e.g., "Eye color").
*
* Return
s: Name ID associated with a palette entry, e.g. eye color
* Return
value: the Name ID found for the color.
*
* Since: 2.1.0
*/
...
...
@@ -122,10 +136,12 @@ hb_ot_color_palette_color_get_name_id (hb_face_t *face,
/**
* hb_ot_color_palette_get_flags:
* @face:
a font face
* @palette_index:
the index of the color palette whose flags are being requested
* @face:
#hb_face_t to work upon
* @palette_index:
The index of the color palette
*
* Returns: the flags for the requested color palette.
* Fetches the flags defined for a color palette.
*
* Return value: the #hb_ot_color_palette_flags_t of the requested color palette
*
* Since: 2.1.0
*/
...
...
@@ -138,25 +154,22 @@ hb_ot_color_palette_get_flags (hb_face_t *face,
/**
* hb_ot_color_palette_get_colors:
* @face: a font face.
* @palette_index:the index of the color palette whose colors
* are being requested.
* @start_offset: the index of the first color being requested.
* @color_count: (inout) (optional): on input, how many colors
* can be maximally stored into the @colors array;
* on output, how many colors were actually stored.
* @colors: (array length=color_count) (out) (optional):
* an array of #hb_color_t records. After calling
* this function, @colors will be filled with
* the palette colors. If @colors is NULL, the function
* will just return the number of total colors
* without storing any actual colors; this can be used
* for allocating a buffer of suitable size before calling
* hb_ot_color_palette_get_colors() a second time.
*
* Retrieves the colors in a color palette.
*
* Returns: the total number of colors in the palette.
* @face: #hb_face_t to work upon
* @palette_index: the index of the color palette to query
* @start_offset: offset of the first color to retrieve
* @color_count: (inout) (optional): Input = the maximum number of colors to return;
* Output = the actual number of colors returned (may be zero)
* @colors: (array length=color_count) (out) (optional): The array of #hb_color_t records found
*
* Fetches a list of the colors in a color palette.
*
* After calling this function, @colors will be filled with the palette
* colors. If @colors is NULL, the function will just return the number
* of total colors without storing any actual colors; this can be used
* for allocating a buffer of suitable size before calling
* #hb_ot_color_palette_get_colors() a second time.
*
* Return value: the total number of colors in the palette
*
* Since: 2.1.0
*/
...
...
@@ -177,9 +190,11 @@ hb_ot_color_palette_get_colors (hb_face_t *face,
/**
* hb_ot_color_has_layers:
* @face: a font face.
* @face: #hb_face_t to work upon
*
* Tests whether a face includes any COLR color layers.
*
* Return
s: whether COLR table is available.
* Return
value: true if data found, false otherwise
*
* Since: 2.1.0
*/
...
...
@@ -191,14 +206,17 @@ hb_ot_color_has_layers (hb_face_t *face)
/**
* hb_ot_color_glyph_get_layers:
* @face: a font face.
* @glyph: a layered color glyph id.
* @start_offset: starting offset of layers.
* @count: (inout) (optional): gets number of layers available to be written on buffer
* and returns number of written layers.
* @layers: (array length=count) (out) (optional): layers buffer to buffer.
* @face: #hb_face_t to work upon
* @glyph: The glyph index to query
* @start_offset: offset of the first layer to retrieve
* @count: (inout) (optional): Input = the maximum number of layers to return;
* Output = the actual number of layers returned (may be zero)
* @layers: (array length=count) (out) (optional): The array of layers found
*
* Fetches a list of all color layers for the specified glyph index in the specified
* face. The list returned will begin at the offset provided.
*
* Return
s: Total number of layers a layered color glyph have.
* Return
value: Total number of layers available for the glyph index queried
*
* Since: 2.1.0
*/
...
...
@@ -219,11 +237,11 @@ hb_ot_color_glyph_get_layers (hb_face_t *face,
/**
* hb_ot_color_has_svg:
* @face:
a font face
.
* @face:
#hb_face_t to work upon
.
*
*
Check whether @face has
SVG glyph images.
*
Tests whether a face includes any
SVG glyph images.
*
* Return
s true if available
, false otherwise.
* Return
value: true if data found
, false otherwise.
*
* Since: 2.1.0
*/
...
...
@@ -235,12 +253,12 @@ hb_ot_color_has_svg (hb_face_t *face)
/**
* hb_ot_color_glyph_reference_svg:
* @face:
a font face.
* @glyph: a svg glyph index
.
* @face:
#hb_face_t to work upon
* @glyph: a svg glyph index
*
*
Get
SVG document for a glyph. The blob may be either plain text or gzip-encoded.
*
Fetches the
SVG document for a glyph. The blob may be either plain text or gzip-encoded.
*
* Return
s: (transfer full): respective svg blob of the glyph, if available.
* Return
value: (transfer full): An #hb_blob_t containing the SVG document of the glyph, if available
*
* Since: 2.1.0
*/
...
...
@@ -257,11 +275,11 @@ hb_ot_color_glyph_reference_svg (hb_face_t *face, hb_codepoint_t glyph)
/**
* hb_ot_color_has_png:
* @face:
a font face.
* @face:
#hb_face_t to work upon
*
*
Check whether @face has PNG glyph images (either
CBDT or sbix tables).
*
Tests whether a face has PNG glyph images (either in
CBDT or sbix tables).
*
* Return
s true if available, false otherwise.
* Return
value: true if data found, false otherwise
*
* Since: 2.1.0
*/
...
...
@@ -273,14 +291,14 @@ hb_ot_color_has_png (hb_face_t *face)
/**
* hb_ot_color_glyph_reference_png:
* @font: a font object, not face. upem should be set on
* that font object if one wants to get optimal png blob, otherwise
* return the biggest one
* @font: #hb_font_t to work upon
* @glyph: a glyph index.
*
* Get PNG image for a glyph.
* Fetches the PNG image for a glyph. This function takes a font object, not a face object,
* as input. To get an optimally sized PNG blob, the UPEM value must be set on the @font
* object. If UPEM is unset, the blob returned will be the largest PNG available.
*
* Return
s: (transfer full): respective PNG blob of the glyph, if available.
* Return
value: (transfer full): An #hb_blob_t containing the PNG image for the glyph, if available
*
* Since: 2.1.0
*/
...
...
src/hb-ot-color.h
浏览文件 @
3f74b7a1
...
...
@@ -59,11 +59,11 @@ hb_ot_color_palette_color_get_name_id (hb_face_t *face,
/**
* hb_ot_color_palette_flags_t:
* @HB_OT_COLOR_PALETTE_FLAG_DEFAULT:
d
efault indicating that there is nothing special
* @HB_OT_COLOR_PALETTE_FLAG_DEFAULT:
D
efault indicating that there is nothing special
* to note about a color palette.
* @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND:
f
lag indicating that the color
* @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND:
F
lag indicating that the color
* palette is appropriate to use when displaying the font on a light background such as white.
* @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND:
f
lag indicating that the color
* @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND:
F
lag indicating that the color
* palette is appropriate to use when displaying the font on a dark background such as black.
*
* Since: 2.1.0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录