This font "Sakkal Majalla" used to work just fine with the previous versions of VLC. It is one of the default installed Arabic fonts by windows/office.
Jean-Baptiste Kempfchanged title from Subtitle disappears in full-screen mode! to Subtitle disappears in full-screen mode with specific font
changed title from Subtitle disappears in full-screen mode! to Subtitle disappears in full-screen mode with specific font
With a 1280x528 video, and the font set to Sakkal Majalla, CTRL + Wheel Up to scale the text to 200%. When windowed the text is rendered fine for Subrip and OSD. In full screen (with a resolution of 1920x1080) no text appears and LayoutParagraph(): Invalid max width is reported.
With the higher resolution a larger font size is used and FT_MulFix in LoadGlyphs() causes an overflow. This does not happen with Arial because it has a lower max_advance_width
Even with the overflow fixed, I was still unable to scale the text above 400% with a 1280x720 video using the Sakkal Majalla font. So the patch uses advance values of individual glyphs when setting pi_max_advance_x instead of the font's max_advance_width