生产器:pango
- 目录
插件信息
title: Pango
media types:
Video
description: 一个标题生成器,使用 Pango 国际化文本排版与 Freetype2 字体渲染器。
version: 4
creator: Dan Dennedy
copyright: Meltytech, LLC
license: LGPLv2.1
说明
提供扩展名为 ".txt" 的文件名会使 loader 生产器使用 pango 加载。如果文件名以 "+" 开头,pango 生产器会把该文件名解释为 pango 文本。这是在 melt 命令中内嵌标题的简写方式。对于 MLT XML,建议把标题文本内嵌在属性值中。 Pango 内置缩放功能。它会把最初渲染的标题重新缩放为消费器所请求的尺寸。因此,如果这样请求,它会失去宽高比,需要由消费器请求一个能保持图像宽高比例的合适宽度和高度。 环境变量 MLT_PANGO_PRODUCER_CACHE 可用于覆盖并同时使用的已转换图像缓存大小。pango 生产器使用的字体集只加载一次。这一行为导致在使用了 pango 生产器的进程重启之前无法使用新字体。要强制重新加载字体映射(fontmap),需要向 pango 生产器发送 "fontmap-reload" 事件:{ mlt_profile profile = mlt_profile_init("dv_pal"); mlt_producer producer = mlt_factory_producer(profile, "pango", NULL); mlt_events_fire(mlt_producer_properties(producer), "fontmap-reload", NULL ); mlt_producer_close(producer); mlt_profile_close(profile); };
参数
resource
title: 文件
description:
包含 Pango 标记(markup)的文本文件,参见:
https://developer.gnome.org/pango/stable/PangoMarkupFormat.html
需要按 XML 风格对以下特殊字符做编码:
<, >, & 编码为 <, >, &type: string
readonly: no
required: no
widget: fileopen
markup
title: 标记
description:
包含 Pango 标记(markup)的字符串,参见:
http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html
需要按 XML 风格对以下特殊字符做编码:
<, >, & 编码为 <, >, &type: string
readonly: no
required: no
widget: textbox
fgcolour
title: 前景色
description:
颜色值是 RGB 加 alpha 通道的十六进制表示,形式为 0xrrggbbaa。颜色也可以是这些单词:white、black、red、green 或 blue。还可以使用 HTML 风格的颜色值 #rrggbb 或 #aarrggbb。
type: string
readonly: no
required: no
widget: color
bgcolour
title: 背景色
description:
颜色值是 RGB 加 alpha 通道的十六进制表示,形式为 0xrrggbbaa。颜色也可以是这些单词:white、black、red、green 或 blue。还可以使用 HTML 风格的颜色值 #rrggbb 或 #aarrggbb。
type: string
readonly: no
required: no
widget: color
olcolour
title: 描边颜色
description:
颜色值是 RGB 加 alpha 通道的十六进制表示,形式为 0xrrggbbaa。颜色也可以是这些单词:white、black、red、green 或 blue。还可以使用 HTML 风格的颜色值 #rrggbb 或 #aarrggbb。
type: string
readonly: no
required: no
widget: color
outline
title: 描边宽度
description:
描边的宽度,以像素计。
type: string
readonly: no
required: no
minimum: 0
maximum: 3
default: 0
unit: pixels
widget: spinner
underline
title: 下划线
description:
为文本应用下划线装饰。
type: boolean
readonly: no
required: no
default: 0
widget: checkbox
strikethrough
title: 删除线
description:
为文本应用删除线装饰。
type: boolean
readonly: no
required: no
default: 0
widget: checkbox
align
title: 段落对齐
description:
left、centre、right(也可分别使用数字 0、1 和 2)
type: string
readonly: no
required: no
default: left
widget: combo
pad
title: 内边距
description:
背景矩形在文本边缘之外扩展的像素数。
type: integer
readonly: no
required: no
default: 0
unit: pixels
widget: spinner
text
title: 文本
description:
UTF-8 编码的非标记字符串
(可以包含未编码的标记字符)type: string
readonly: no
required: no
widget: textbox
family
title: 字体族
description:
不使用标记时使用的默认字体类型。
type: string
readonly: no
required: no
default: Sans
widget: combo
size
title: 字号
description:
不使用标记时使用的字体大小,以像素计。
type: integer
readonly: no
required: no
default: 48
unit: pixels
widget: spinner
style
title: 字体样式
description:
不使用标记时使用的字体样式。
type: string
readonly: no
required: no
default: normal
widget: combo
values:
- normal
- italic
- oblique
weight
title: 字体粗细
description:
字体的粗细(weight)。
type: integer
readonly: no
required: no
minimum: 100
maximum: 1000
default: 400
widget: spinner
encoding
title: 编码
description:
当输入不是 UTF-8 时的文本编码类型。可用输入列表参见 'iconv --list'。
type: string
readonly: no
required: no
default: UTF-8
widget: combo
real_width
title: 实际宽度
description:
渲染标题原始的、未缩放的宽度。
type: integer
readonly: yes
required: no
unit: pixels
real_height
title: 实际高度
description:
渲染标题原始的、未缩放的高度。
type: integer
readonly: yes
required: no
unit: pixels
width
title: 宽度
description:
最近一次请求的缩放后图像宽度。
type: integer
readonly: yes
required: no
unit: pixels
height
title: 高度
description:
最近一次请求的缩放后图像高度。
type: integer
readonly: yes
required: no
unit: pixels
force_aspect_ratio
title: 样本宽高比
description:
可选地覆盖被(错误)检测出的宽高比
type: float
readonly: no
required: no
rotate
title: 旋转角度
description:
文本旋转角度,以度为单位。正值表示顺时针。
type: integer
readonly: no
required: no
default: 0
unit: degrees
widget: spinner
width_crop
title: 裁剪宽度
description:
限制渲染图像的宽度。
type: integer
readonly: no
required: no
default: 0
unit: pixels
widget: spinner
width_fit
title: 适应宽度
description:
缩放 pango 排版以适配指定宽度。
type: integer
readonly: no
required: no
default: 0
unit: pixels
widget: spinner
line_spacing
title: 设置行间距
description:
设置排版各行之间的间距量。
type: integer
readonly: no
required: no
default: 0
widget: spinner
stretch
title: 字体拉伸
description:
pango 字体描述(font description)的拉伸特性。可能取值:1 - ULTRA_CONDENSED 2 - EXTRA_CONDENSED 3 - CONDENSED 4 - SEMI_CONDENSED 5 - NORMAL 6 - SEMI_EXPANDED 7 - EXPANDED 8 - EXTRA_EXPANDED 9 - ULTRA_EXPANDED
type: integer
readonly: no
required: no
minimum: 0
maximum: 9
default: 4
widget: spinner
wrap_width
title: 设置折行宽度
description:
设置 PangoLayout 各行应当折行的宽度。
type: integer
readonly: no
required: no
default: 0
unit: pixels
widget: spinner
wrap_type
title: 设置折行模式
description:
设置折行模式;折行模式仅在设置了 'wrap_width' 时才生效。可能取值:0 - 在单词边界处折行 1 - 在字符边界处折行 2 - 在单词边界处折行,但若容纳不下完整单词则退回到字符边界折行
type: integer
readonly: no
required: no
default: 0
widget: spinner