<p>I met this issue when I'm developing a player. And I checked codes in <a href="https://github.com/Aegisub/Aegisub/blob/master/src/auto4_base.cpp" rel="nofollow noreferrer">Aegisub</a> (line:159). I saw there is a scale from calculated size to real size. I think this is to keep the rendered text height being same with set fontSize. Maybe there's a spec that says something about this.</p>

CC BY-SA 4.0
2022-08-24T17:44:46.763Z
2022-08-24T17:44:46.763Z
MaoQ
<p>My final video output is 1080:1920 (9:16 aspect ratio), after padding.</p>
<p>In .ass file, I set
PlayResX: 1080
PlayResY: 1920
and then the font-size=130. But, this font-size doesnt occupy exact 130 pixels on screen, when I render the video using ffmpeg.</p>
<p>If my video (in react js UI) width=108px; height=192px; then font-size = 13px (=130*(192/1920)) appear much larger than what 130px looks in 1080px:1920px (in proportion). However, if I multiple 13px by 2/3, I get almost the correct size.</p>
<p>What is a more robust method of setting font-sizes in .ass (with ffmpeg)?</p>

CC BY-SA 4.0
2022-01-19T09:44:34.930Z
Did you ever get the solution to this? i have been multiplying the font by 1.4 to make it almost the same but thats just an arbitrary number i found from trial and error.
prasum
<ffmpeg><video-editor><subtitles>
Correct method to set font-size in .ASS file
jsdbt
# Correct method to set font-size in .ASS file

(Asked by: username_0 on 2020-08-31)

My final video output is 1080:1920 (9:16 aspect ratio), after padding.

In .ass file, I set
PlayResX: 1080
PlayResY: 1920
and then the font-size=130. But, this font-size doesnt occupy exact 130 pixels on screen, when I render the video using ffmpeg.

If my video (in react js UI) width=108px; height=192px; then font-size = 13px (=130\*(192/1920)) appear much larger than what 130px looks in 1080px:1920px (in proportion). However, if I multiple 13px by 2/3, I get almost the correct size.

What is a more robust method of setting font-sizes in .ass (with ffmpeg)?

**Tags:** ffmpeg, video-editor, subtitles

> **Comments:**
> **username_1**: Did you ever get the solution to this? i have been multiplying the font by 1.4 to make it almost the same but thats just an arbitrary number i found from trial and error.  

---

## 1 answers

### Answer by username_2 on 2022-08-24. Score: 0

I met this issue when I'm developing a player. And I checked codes in [Aegisub](https://github.com/Aegisub/Aegisub/blob/master/src/auto4_base.cpp) (line:159). I saw there is a scale from calculated size to real size. I think this is to keep the rendered text height being same with set fontSize. Maybe there's a spec that says something about this.


---

