-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@font vertical writing is displayed wrong #695
Comments
To render vertical Japanese in ASS, you must do the following:
You can specify the font and rotation using override tags:
or in a style definition: [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: VerticalJapanese,@Meiryo,96,&H000000FF,&H000000FF,&H000000FF,&H000000FF,0,0,0,0,100,100,0,-90,1,0,0,3,0,196,0,1
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:10.00,VerticalJapanese,,0,0,0,,日本語もいい For positioning, try changing the |
I’m not sure which exact symbols you’re trying to use, but yes, some are unfortunately rotated incorrectly in current libass, and I’m afraid you don’t have any solution for this (other than manually positioning every glyph). You may get a better result using a Windows computer with VSFilter (instead of libass): for example, you could invoke VSFilter via AviSynth and use the AviSynth script as the input for FFmpeg. This has previously been mentioned in #600 and https://code.google.com/archive/p/libass/issues/95 (and elsewhere), but we don’t seem to have a clearly dedicated GitHub issue for it. Maybe I should create one. My most recent idea was to have libass use HarfBuzz’s vertical-writing mode and hope that it solves this. |
Yeah, if VSFilter/GDI handles this, I would assume it's by using vertical mode for @ fonts, and setting that in harfbuzz should be exactly what we want here. |
The reason I have doubts is because vertical writing support in Windows is pretty old and I couldn’t find clear information on how fonts define it when I first tried (including by looking inside Microsoft’s older fonts). But yeah, it’s my best guess/hope that HarfBuzz should be able to handle it. |
Well, the core of it's going to be alternate glyphs using an opentype feature or the like, right? So at worst, we might have to experiment with specific flags (vert/vrtr/vrt2). |
Thank you for your advice.I have looked into Harfbuzz and it seems very difficult for me.But I'll try a little harder. |
Apparently there exists a libass downstream fork for displaying ISDB subtitles and one of its patches seems related to this and may be worth a closer look (at first glance it appears to also automatically rotate, which we don't want): 0p1pp1/libass@ca5cc11e1 + 0p1pp1@76704b5 @ch3ewb4cc4 if you’re only burning the subtitles into the video and not distributing the soft subtitles, you may want to use this fork until we have a proper, VSFilter-comaptible fix. (If you do distribute soft subs, do not use the downstream fork as whatever you author will be incompatible with any ASS real renderer, including both current and future fixed libass) |
Some previous investigation that may be relevant: waddou/libass#95 |
Oh, someone did archive the Google Code repo on GitHub! That’s good to know. Of course, Google still hosts its own archive, but it’s anonymized. |
I can't reproduce the issue described here using the text Please confirm what libass version you're using, and attach a sample ASS file and all associated fonts. |
I don’t think that’s |
Hi, I created Japanese vertical subtitles in aegisub.
But the symbols are displayed horizontally.
When I burn the subtitles with ffmpeg, they are displayed horizontally and burned. Does anyone know how to solve this problem?
Sorry for my poor English.
The text was updated successfully, but these errors were encountered: