Open ludicch opened 10 years ago
Thanks. I was aware of the parsing issue, just haven't had time to commit the fix. If you want, you can do a pull request for those changes and I'll merge it with master. If not, I'll commit those changes this weekend.
Yeah. Again, busy with other stuff. I'll try to do some kind of guide for that soon, as there are a few things to consider when creating proper fonts to use with the library. In the mean time take a look at this python script which basically automates the process. I've only tested it on Linux, but with some effort Windows and Mac OS X should work, too. Dependencies for it are here (exclude mkvtoolnix).
The license is LGPL. Both files are there cause last I checked it's a requirement to have both files distributed together, or something like that.
thanks for the info's.
i have some special requirements for the usage of the subtitles. i use it for speech bubbles. i needed to modify a bit and add some features. i have added a individual width limit to the text.
in ASSRenderer.as
// added this
var effectParms:Array = event.effect.split(";");
for each (var parm:String in effectParms) {
if (parm.length == 0) {
continue;
}
// limit width of string
if (parm.substr(0,1) == "w") {
var wrapMaxWidth:int = parseInt(parm.substr(1), 10);
marginRect.width = Math.min(wrapMaxWidth, marginRect.width);
}
}
// the code is added before (line 1100)
caption.makeLines(caption_ ? caption.getMarginRect() : marginRect);
i can now add a list of tags (w400) to the effects to individually limit the width. now it sometimes happends that the last line is cut off. likely because the height is not accordingly updated. do you have a simple idea how to better implement a individual width maximum?
the width and height calculated and available when the "onCaptionDisplayed" is fired is quite a bit off for top aligned subtitles. i use this information to add the speech-bubble in the background when a label is displayed. maybe it's correct as well and my interpretation of the alignment is wrong. i can well live with the data by using middle and bottom aligned texts. however it may indicate a problem.
private function myEventHandler(event:ICaption):void {
// this returns a rectangle object that should have the correct width and height values
((ASSCaption)event).getRect();
}
for me i had to change the regExp to accept files generated by Aegisub editor:
i also had a problem with the missing a description how to generate fonts. however in the meantime i solved the issue.
also i wondered what license your library is based on. there is a gpl and a lgpl file in the code, but it's no specified what applies.
thanks