Alex 发表于 2013-11-4 22:41
I have another 2 question
Why the position it's not exactly correct, there is space between letter ...
Why the position it's not exactly correct, there is space between letters?
< alignment = 7 >
# indicate where to put the texts, you can refer to the number keyboard. Default alignment for horizontal layout is an1, default alignment for vertical layout is an9
Alex 发表于 2013-11-5 23:11
When i used pixel, I got some space between letters, I think it's happening for pixels
you can see ...
## Initialize a font and retrieves the metrics 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 text a string, the text that is going to be measured
# @return (0 width, 1 height, 2 horiBearingX, 3 horiBearingY, 4 horiAdvance, 5 vertBearingX, 6 vertBearingY, 7 vertAdvance, 8 x_ppem, 9 y_ppem, 10 x_scale, 11 y_scale, 12 ascender, 13 descender, 14 px_height, 15 max_advance)
def TextMetrics(font_file, face_id, font_size, spacing, space_scale, text):
## Retrieve the metrics 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 (0 width, 1 height, 2 horiBearingX, 3 horiBearingY, 4 horiAdvance, 5 vertBearingX, 6 vertBearingY, 7 vertAdvance, 8 x_ppem, 9 y_ppem, 10 x_scale, 11 y_scale, 12 ascender, 13 descender, 14 px_height, 15 max_advance)
def TextMetrics(font, text):
Alex 发表于 2013-11-13 18:03
Ok
I'm trying to make a square clip by using text metrics ( Height & width Only)
Alex 发表于 2013-11-14 15:16
Nothing happened , saying that %i same %d +_+
I tested everything, doesn't solve m ...
Alex 发表于 2013-11-17 20:13
it's ok now,
but shape position why it's different should be same text clip -_-
Alex 发表于 2013-11-19 14:45
Hahaha... I see that, I miss you XD
Anyway. I didn't use pixels its shape only and the position is ...
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/) | Powered by Discuz! X2 |