Unity3D font rendering issue

Bug #1316138 reported by Michael Müller on 2014-05-05
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Pipelight
Low
Unassigned

Bug Description

The login form at http://www.desktopdungeons.net/play-desktop-dungeons-beta/ does not show any characters when text is inserted, but it is possible to copy the text to the clipboard with the correct content.

Revision history for this message
Michael Müller (mqchael) wrote :

Hi,

I found out that Unity3D does not use the font API to enumerate the fonts (which would be the correct way), but actually enumerates the fonts manually. Since Wine does not put any files or symlinks into C:\windows\Fonts, Unity3D can not load Arial and fails to display the text. We need to find out what would be the best solution to fix this problems. We would also need to add symlinks for other fonts so that Unity can detect them.

In the meantime a symlink can be used to get around the problem. On Ubuntu the following command fixes the problem:

ln -s /opt/wine-compholio/share/wine/fonts/arial.ttf ~/.wine-pipelight/drive_c/windows/Fonts/Arial.ttf

Michael

Changed in pipelight:
status: Triaged → In Progress
Revision history for this message
Hex Luther (sloanfromflylikeabird3) wrote :

Another way is to simply download Arial.ttf from the internet and paste it/drag it into ~/.wine-pipelight/drive_c/windows/Fonts/.

Revision history for this message
Daniel Hollocher (chogydan) wrote :

Yes you can download the font from the internet and put it in the correct place, but that misunderstands the issue. FWIW, you already have the arial font; pipelight fails to put it in the correct folder. So you could just get the arial font from the compholio location, and put it into the pipelight location.

But from a technical standpoint, comment #1 seems to be the most correct

Revision history for this message
Michael Müller (mqchael) wrote :

Pipelight does not put them into the wrong folder. The problem is that Unity does not use the windows API functions to load the fonts and instead they wrote their own font loader which does not respect the way how fonts are supposed to be handled on Windows.

It is perfectly fine to move all fonts on a Windows system to a different folder as long as you put the correct path into the Registry. All programs should still find the font, but Unity has a dumb implementation which only searches for files in C:\Windows\Fonts.

In the past I wrote a patch for Wine which creates symlinks for all fonts in C:\Windows\Fonts. This is also not a perfect solution since it creates hundred of symlinks that need to be kept in sync with the rest of the system. The patch was not perfect and would need to be improved before we can add it.

Revision history for this message
Joseph Price (pricechild) wrote :

With no fonts in /opt, I went for:

ln -s /usr/share/fonts/truetype/msttcorefonts/Arial.ttf ~/.wine-pipelight/drive_c/windows/Fonts/Arial.ttf

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions