Comments (5)
Can you post an image of the desired effect?
Generally speaking, available options depend on your usecase. Are you authoring ASS subtitles for distribution, or are you using libass only internally within your program and any generated ASS is transient and never visible to the outside?
from libass.
Thanks for your reply~
This is what I expect to achieve. This part will only be used internally within our program.
from libass.
The inner black outline in your image has a directional bias with it being thicker on the right and lower site than on the left or upper one (and non-zero everywhere). This doesn't have a direct equivalent in ASS, but you might be able to get a similar result by combining a small border and shadow of the same colour.
As for the general setup with an outer and inner border(+shadow), you can duplicate the same text into two events on different layers. For the back layer set border and primary colour to the same value, disable shadow and set a large border. For the top layer set border (and shadow) to a different colour than in the back layer and use a smaller border and/or shadow value.
If the events are implicitly positioned, add an extra glyph from the same font to both layers and apply the highest used border value and use {\fscx0}
to hide it. This will make both layers behave the same in collisions. If an event has multiple lines of text, you need to do this for both the top and bottom line of the event.
This approach is also suitable for authoring ASS tracks for distribution.
E.g. here is an example with different settings for the inner black outline/shadow. From top to bottom it uses (a) only shadow, (b) only border and (c) a thin border and additionally a shadow:
[Script Info]
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None
PlayResX: 1920
PlayResY: 1080
[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,IPAMincho,152,&H00FFFFFF,&H000000FF,&H00B3ECFF,&H00000000,0,0,0,0,100,100,0,0,1,0,0,5,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,,{\bord30\1c&HB3ECFF&}東日本旅客鉄道株式会社{\fscx0}-
Dialogue: 1,0:00:00.00,0:00:05.00,Default,,0,0,0,,{\xshad5\yshad5}東日本旅客鉄道株式会社{\fscx0\bord30}-
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,{\bord30\1c&HB3ECFF&}東日本旅客鉄道株式会社{\fscx0\bord30}-
Dialogue: 1,0:00:00.00,0:00:05.00,Default,,0,0,0,,{\3c&H000000&\bord4}東日本旅客鉄道株式会社{\fscx0\bord30}-
Dialogue: 0,0:00:00.00,0:00:05.00,Default,,0,0,0,,{\bord30\1c&HB3ECFF&}東日本旅客鉄道株式会社{\fscx0\bord30}-
Dialogue: 1,0:00:00.00,0:00:05.00,Default,,0,0,0,,{\3c&H000000&\bord2\xshad3\yshad1}東日本旅客鉄道株式会社{\fscx0\bord30}-
from libass.
Since there was no further response, I’ll assume the method from my last post is sufficient and all questions were answered.
from libass.
thanks for a lot!
from libass.
Related Issues (20)
- Performance regression results in severe framedrops for typesetted subtitles HOT 8
- Memory leak in ass_font_provider_add_font HOT 28
- Rendering: wrong direction of lines HOT 5
- Request: GPU rendering backend HOT 1
- Investigate unexpected vsfilter behavior with \h on certain font HOT 15
- Font size differs from VSFilter for specific fonts HOT 4
- Try to parse script properties even if missing "[Script Info]" HOT 1
- Significant perf drop for specific, lower(!) resolution HOT 2
- Rendering: Unable to render some bitmap style fonts HOT 2
- Rendering: unexpected stretching HOT 3
- Rendering: libass doesn't set a default name for the style when it is empty HOT 1
- How to handle auto wrap when burn chinese subtitle with ffmpeg HOT 1
- Rendering: The same Ass script using the \blur tag performs abnormally on the Android platform, but on iOS HOT 1
- Rendering: Drawing without m isn't rendered by VSFilter HOT 2
- Why is the macro definition 'PARSE_START if (0)' executed HOT 1
- image question HOT 4
- A subset font has ligatures applied in VSFilter even without complex scripts HOT 1
- Some questions about ASS File Format Guide HOT 7
- Rendering: English glyph for Segoe UI Variable Display is wrong from yesterday HOT 2
- \ko fails to remove outline from shadow HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libass.