From: Mger Z. <mge...@ya...> - 2011-06-16 15:00:47
|
This fix will allow spumux to generate better-quality subtitles from a text source, such as from a srt subtitles file. In dvdauthor 0.7.0, there is already a comment about this fix, I believe by Lawrence D'Oliveiro. Therefore, this fix may or may not already have been implemented in the latest git version. In subconf.c, line 96 should be changed to static int const font_load_flags = FT_LOAD_TARGET_MONO | FT_LOAD_MONOCHROME | FT_LOAD_RENDER; The original line has FT_LOAD_NO_HINTING in place of FT_LOAD_TARGET_MONO. FT_LOAD_NO_HINTING deals with anti-aliasing. I did some casual tests and verified that anti-aliasing with the current dvdauthor code does not generate good quality subtitles. >From what I'm able to find with google, you can either use anti-alias or hinting in freetype. Since anti-alias doesn't give good quality subtitles, we should use hinting instead. FT_LOAD_MONOCHROME and FT_LOAD_RENDER both indicate the preference to use "monochrome" to render the image. FT_LOAD_TARGET_MONO is set to use a hinting algorithm optimized for "monochrome". In effect, the 3 variables should work well together, since all 3 deal with "monochrome". After the fix, I notice the letter 'o' and letter 'g' look much better. Here are some screenshots. original letter o <a href="http://imageshack.us/photo/my-images/585/origo.jpg/"> orig o </a> after fix, letter o <a href="http://imageshack.us/photo/my-images/64/fixot.jpg/"> fix o </a> original letter g <a href="http://imageshack.us/photo/my-images/813/origg.jpg/"> orig g </a> after fix, letter g <a href="http://imageshack.us/photo/my-images/3/fixg.jpg/"> fix g </a> The quality is not perfect, but it should be better than before. In linux, I don't think there is any other good programs to generate subtitles from a text file, so this fix should definite help linux users like me. |