Skip to content
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

Improvements for fonts detection #92

Open
kannarima opened this issue Apr 3, 2024 · 2 comments
Open

Improvements for fonts detection #92

kannarima opened this issue Apr 3, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@kannarima
Copy link

Describe the solution you'd like

  • Font can be changed in dialogue section, so it can be good to check also in dialogue section for fonts used
  • It can be good to take only required variant instead of take all (for example only take bold variant if normal and italic are not used)
  • Sometimes, variant used not exist (for example bold used but only normal exist) but nothing is write in the ASS specs so it have to fallback to normal if bold not exist I think
@kannarima kannarima added the enhancement New feature or request label Apr 3, 2024
@moi15moi
Copy link

moi15moi commented May 1, 2024

I suggest you to use this package to handle the font selection: https://github.com/moi15moi/FontCollector

There is currently a pre-release of the 3.0.0.
If you have any suggestion, feel free to open a issue.

@hazylumkun
Copy link

maybe you can modify dl.py :
#659:

override_pattern = re.compile(r"\{[^}]*\\fn([^\\}]+)[^}]*\}")

#663:

if line.startswith("Dialogue: "):
    overridden_fonts = [font_name.strip() for font_name in override_pattern.findall(line)]
    font_names.extend(overridden_fonts)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants