- UID
- 3
- 积分
- 8169
- 帖子
- 259
- 主题
- 68
- 论坛币
- 5016
- 威望
- 54
- EP值
- 2533
- MP值
- 20
- 阅读权限
- 200
- 注册时间
- 2011-8-3
- 在线时间
- 1097 小时
- 最后登录
- 2022-10-8
|
## Initialize a font and retrieves a PIX of the specified text from the font.
# @param font_file a string, filename of the target font file
# @param face_id an integer, font face id, should always be 1 in TTF files
# @param font_size an integer, font size, in em height
# @param spacing an integer, spacing between texts, can be negative
# @param space_scale a float, scale of white spaces
# @param color an integer, rgb color of the font
# @param bord an integer, border of the font, can be negative
# @param is_outline an integer, 0 - include body, 1 - only retrieve the outline
# @param text a string, the text that is going to generate a PIX
# @return PIX the target PIX
def TextPix(font_file, face_id, font_size, spacing, space_scale, color, bord, is_outline, text):
## Retrieve a PIX of the specified text from a font.
# @param font a handler, the handler to the font
# @param text a string, the text that is going to generate a PIX
# @return PIX the target PIX
def TextPix(font, text):
## Get text outline points. (outline curve to points in order)
# @param font_file a string, filename of the target font file
# @param face_id an integer, font face id, should always be 1 in TTF files
# @param font_size an integer, font size, in em height
# @param text a string, the text of which the outline will be retrieved
# @param density a float, the density of points that we want to have, 1.0 is commonly used, however it can be less or larger than 1 according to the need
# @return ((x1, y1), (x2, y2), ...)
def TextOutlinePoints(font_file, face_id, font_size, text, density):
## Get text outline points.
# @param font a handler, the handler to the font
# @param text a string, the text of which the outline will be retrieved
# @param density a float, the density of points that we want to have, 1.0 is commonly used, however it can be less or larger than 1 according to the need
# @return ((x1, y1), (x2, y2), ...)
def TextOutlinePoints(pyFont, text, density): |
|