Page 1 of 1

outline bug with specific font

Posted: Fri Jan 02, 2015 11:57 am
by Keul
Hello

I have a bug with the outline of text with a specific font where the dots of the "!" and "?" are not outlined.

The font can be downloaded here:
http://www.dafont.com/fr/vinegar.font

An a script.rpy testcase:

Code: Select all

define e = Character('Eileen', color="#c8ffc8")

init python:
    style.default.font = "Vinegar-Regular.otf"
    # style.default.antialias = True
    style.default.outlines = [(1,"#ff0000")]
    
label start:
    e "test1 ! ? . i ok "
    "test1 ! ? . i ok "
    jump start
    return

Re: outline bug with specific font

Posted: Fri Jan 02, 2015 12:07 pm
by PyTom
There's a known issue with some fonts that causes outlines to not work. The problem is with the fonts, and not Ren'Py. The issue is that, for a character like ?, the top part has the points that make up the character in one order (say, clockwise), while the bottom part has it in the other order (say, counterclockwise).

Ren'Py outlines a character by stroking the character's outer outline - which is determined by freetype by the direction in which the points occur. When you have a pair of directions like this, only one will get stroked.

Fontforge has a option - "Element > Correct Direction" - that seems to fix this problem.

Re: outline bug with specific font

Posted: Fri Jan 02, 2015 12:49 pm
by Keul
That fixed the problem. Thanks.
I've also added the missing «…» character.

Now, I have to contact the author and see if we can get an exception for the Creative Common NC-ND.