so... RE: unicode

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

User avatar
DarkFenX
Engineer
Engineer
Posts: 98
Joined: 16 Oct 2006 20:32
Location: Russia, Saint-Petersburg
Contact:

Post by DarkFenX »

Thx for advice... but - I've already done it before posting my previous post (compiled .lib file by myself, placed it in library folder, copied headers into include folder), and got 8 unresolved externals.
Today tried to do it with precompiled .lib and headers from useful package - still the same :(
fontcache.obj : error LNK2001: unresolved external symbol _FT_Done_Face@4
fontcache.obj : error LNK2001: unresolved external symbol _FT_Load_Char@12
fontcache.obj : error LNK2001: unresolved external symbol _FT_Init_FreeType@4
fontcache.obj : error LNK2001: unresolved external symbol _FT_Select_Charmap@8
fontcache.obj : error LNK2001: unresolved external symbol _FT_Set_Charmap@8
fontcache.obj : error LNK2001: unresolved external symbol _FT_New_Face@16
fontcache.obj : error LNK2001: unresolved external symbol _FT_Render_Glyph@8
fontcache.obj : error LNK2001: unresolved external symbol _FT_Set_Pixel_Sizes@12
I'm using MSVS 2003 - maybe there's problem with it?
- It's hot as hell in here.
- You see it too? For me, it's always like this.
-------------------
ICQ: 302028069
Jabber: DarkFenX@jabber.org
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

check if freetype.lib is included in link command
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

DLLs/Libs should be compiled without name mangeling, i.e. they need a proper export and import statement. If not, these are the usual error messsages.
User avatar
DarkFenX
Engineer
Engineer
Posts: 98
Joined: 16 Oct 2006 20:32
Location: Russia, Saint-Petersburg
Contact:

Post by DarkFenX »

Sry, forgot to point at additional dependency... compiled successfully.
But in-game font didn't changed (this way i still get '?' instead of non-original unicode letters)... should i enable it somehow in .cfg file?
P.S. Do OTTD's devs use versions of additional libs included in useful package, or newer ones if available?
- It's hot as hell in here.
- You see it too? For me, it's always like this.
-------------------
ICQ: 302028069
Jabber: DarkFenX@jabber.org
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

look in your openttd.cfg :)
"*_font" lines should be in the [misc] section (fill them with full path to the font you want to use). If the fonts can't be found when openttd starts it will use the sprites.
User avatar
DarkFenX
Engineer
Engineer
Posts: 98
Joined: 16 Oct 2006 20:32
Location: Russia, Saint-Petersburg
Contact:

Post by DarkFenX »

I tried to place these entries under [font], [freetype], etc sections (found *_font config entries in sources, but hadn't found section where they're used), and hadn't noticed same lines under [misc] section...
So thx guys... at last, i've got it :)
Edit: Do you plan to implement relative (to OTTD's root) path to font? Or some variable like %systemroot%?
- It's hot as hell in here.
- You see it too? For me, it's always like this.
-------------------
ICQ: 302028069
Jabber: DarkFenX@jabber.org
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

You need to start openttd then shut it down. If you open openttd.cfg after that you will see small/medium/large_font = lines. Just put the fulll path of your fonts in there (windows) for example c:\windows\fonts\tahomabd.ttf.

Linux users's can use 'Tahoma Bold' if you have compiled openttd with fontconfig.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

prissi wrote:DLLs/Libs should be compiled without name mangeling, i.e. they need a proper export and import statement. If not, these are the usual error messsages.
It all depends what your calling convention is. Using CDECL they should be undecorated, but STDCALL makes your exports look like this. I'm not entirely about C++ exports but I think those are always decorated.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests