Giter Site home page Giter Site logo

Comments (5)

TheOneric avatar TheOneric commented on June 24, 2024

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.

fzh0627 avatar fzh0627 commented on June 24, 2024

Thanks for your reply~
image
This is what I expect to achieve. This part will only be used internally within our program.

from libass.

TheOneric avatar TheOneric commented on June 24, 2024

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:
grafik

[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.

TheOneric avatar TheOneric commented on June 24, 2024

Since there was no further response, I’ll assume the method from my last post is sufficient and all questions were answered.

from libass.

fzh0627 avatar fzh0627 commented on June 24, 2024

thanks for a lot!

from libass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.