Skip to content

The width value returned by function aegisub.text_extents may be incorrect #520

@op200

Description

@op200

When the spacing == 0 in ASS, the width returned by function aegisub.text_extents may be affected by the font

Filter: libass

Show

\fsp0

Image

\fsp0.001

Image

\fsp20

Image

Code

syl.width, syl.height = aegisub.text_extents(syl.style, syl.text_spacestripped)

double spacing = style->spacing * 64;

File

ASS

[Script Info]
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709
PlayResX: 1920
PlayResY: 1080
LayoutResX: 1920
LayoutResY: 1080

[Aegisub Project Garbage]
Video File: ?dummy:24000/1001:150000:1920:1080:47:163:254:c

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,FOT-ModeMinALarge Std H,100,&H00FFFFFF,&H00000000,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,1,10,10,10,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,{\pos(651,708)}死んだ様な目をしてアンタを見\N123123\N\N\N123ff

Font

FOT-ModeMinALargeStd-H.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions