Comments (5)
Actually, after some further discussion, this sort of thing probably makes a lot more sense at the authoring-tool level than at the renderer.
from libass.
Well, I doubt Aegisub actually parses ASS tags to a large extend - mostly it just generates and displays them, but the user is free to add whatever he wants. Also, subtitle creators (the one who use insane scripts etc.) probably would like to test whether their script does something stupid.
So this actually would make sense?
from libass.
Heh, I was mostly thinking about fonts, but yeah, there are plenty of other ways to be invalid that we could check in-renderer.
from libass.
The problem with this is that we don't have any strict parsing anywhere.
from libass.
A specific case where this comes up (merging from #425):
When working in Aegisub, it's possible to enter a font name that will appear to work on your machine, but won't if the font is muxed. Example:
- The copy of MS PGothic that ships on macOS is non-PostScript, has fullnames
MS PGothic
andMS Pゴシック
, and PostScript nameMS-PGothic
- When searching for
MS-PGothic
, we won't match the font because the fullnames don't match and it's non-PostScript - We then call
default_provider->funcs.get_fallback
, passing inMS-PGothic
- On macOS, CoreText helpfully returns
MS PGothic
- We then search for
MS PGothic
and end up with the font we'd been looking for to begin with
This is hazardous, since it's possible to enter a font name, think everything is perfectly fine, mux it, and then be informed too late that it doesn't work on systems that don't have it installed (or that do, but are on a different platform).
When in strict mode/authoring mode, we should either explode and draw tofu if matching the requested font name fails, or pass Arial to default_provider->funcs.get_fallback
. The latter would be simpler to implement, but the former would be more robust.
from libass.
Related Issues (20)
- 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
- Rendering: performance issue while rendering running rainbow animated subtitles HOT 4
- Rendering: Wrong font used for mpv OSD on Fedora 39+ HOT 2
- Multiple \pos tags in one line, any way to use them? HOT 2
- Inline fallback fonts should be sized to main font’s EM height, not line height
- How to blend ASS_Image to a rgba bitmap HOT 5
- Rendering: natural line break punctuation position in RTL languages HOT 2
- Consider adding SHSTK support HOT 4
- [DirectWrite] Does not select the right font when 2 fonts have similar attributes HOT 4
- API to discard older events from memory HOT 2
- Rendering: Different case for a non-ASCII character doesn't find the font
- Rendering: Difference in font size with Roboto Medium in VSFilter and libass HOT 3
- checkasm struggles with PIC on (64-bit) Haiku HOT 13
- Separate muxed/memory fonts from system fonts
- build: Windows 10 + msys2 (with winiconv): passing argument 2 of 'iconv' from incompatible pointer type HOT 2
- warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argumentbuild: HOT 3
- Rendering: Incorrect font variant being selected HOT 10
- Overhaul fontselect: individual, cached, full-detail queries HOT 6
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.