outline bug with specific font

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
User avatar
Keul
Regular
Posts: 49
Joined: Wed May 06, 2009 3:42 am
Location: France - Strasbourg
Contact:

outline bug with specific font

#1 Post by Keul » Fri Jan 02, 2015 11:57 am

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

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: outline bug with specific font

#2 Post by PyTom » Fri Jan 02, 2015 12:07 pm

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.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Keul
Regular
Posts: 49
Joined: Wed May 06, 2009 3:42 am
Location: France - Strasbourg
Contact:

Re: outline bug with specific font

#3 Post by Keul » Fri Jan 02, 2015 12:49 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users