Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Font scale (\fscx, \fscy) is wrong (bigger than should be) #47

Closed
Dador opened this issue Aug 1, 2015 · 3 comments
Closed

Font scale (\fscx, \fscy) is wrong (bigger than should be) #47

Dador opened this issue Aug 1, 2015 · 3 comments
Milestone

Comments

@Dador
Copy link
Contributor

Dador commented Aug 1, 2015

Seems like proportion is right but whole text becomes much bigger than should be.

In libjass:
libjass-1

In Aegisub (libass):
libass

Test script:

[Script Info]
Title: 
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 1280
PlayResY: 720
Scroll Position: 0
Active Line: 0
Video Zoom Percent: 1
ScaledBorderAndShadow: yes

[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,Trebuchet MS,54,&H00FFFFFF,&H000000FF,&H00020713,&H00000000,-1,0,0,0,100,100,0,0,1,2.55,0,2,0,0,42,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:10:00.00,Default,,0,0,0,,{\fscx50}xxxxxxxxxxxxxxxxx
Dialogue: 0,0:00:00.50,0:10:00.00,Default,,0,0,0,,{\fscy50}yyyyyyyyyyyyyyyyy
@Arnavion
Copy link
Owner

Arnavion commented Aug 1, 2015

For (1), it renders x as "font-size: 46px, scaleY(2)" instead of "font-size: 23px, scaleY(2)". Similarly it renders y as "font-size: 23px, scaleY(0.5)" instead of "font-size: 46px, scaleY(0.5)"

const fontSize = (this._scaleY * this._fontSizeForLineHeight(this._fontName, this._fontSize * (isTextOnlySpan ? this._fontScaleY : 1), this._fontSizeElement)).toFixed(3);

should be

const fontSize = (this._scaleY * this._fontSizeForLineHeight(this._fontName, this._fontSize * (isTextOnlySpan ? this._fontScaleX : 1), this._fontSizeElement)).toFixed(3);

@Arnavion
Copy link
Owner

@Dador Can you move (2) into its own issue?

@Dador Dador changed the title Font scale (\fscx, \fscy) is wrong Font scale (\fscx, \fscy) is wrong (bigger than should be) Aug 26, 2015
@Dador
Copy link
Contributor Author

Dador commented Aug 26, 2015

Yeah, done: #54
I close current issue cause you already fixed it.

@Dador Dador closed this as completed Aug 26, 2015
@Arnavion Arnavion added this to the v0.11.0 milestone Aug 26, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants