Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: [iOS] problem with ttf fonts  (Read 9585 times)

0 Members and 1 Guest are viewing this topic.

lazygames

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • View Profile
    • LAZY GAMES
[iOS] problem with ttf fonts
« on: June 06, 2011, 10:34:59 AM »

Hi! I have a problem with using ttf-font under iOS/macOS.
Quote
However, on iOS the engine is not able to access the system font directory, for that reason you MUST include .ttf files with the iOS version of your game.

How do this? I create comic.font file with this content:
Code: [Select]
TTFONT
{
  SIZE = 12  
  FILENAME = "fonts\comic.ttf"
  COLOR { 100, 0, 0 }
  ALPHA = 255
}

if launch wmelite on windows - everything ok! Window object loading and text on screen.
if launch on iOS (macOs too) - Game.LoadWindow return null.

Any ideas where is the my wrong?

P.S. I try use bitmap font - everything work's good!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: [iOS] problem with ttf fonts
« Reply #1 on: June 06, 2011, 10:50:57 AM »

You must ensure that the .ttf file is compiled in the game package. To do so, open the project settings in ProjectMan, go to the "Filters" tab, and remove the *.ttf extension from the "Copy as is" field. Ideally move *.ttf to the "Do not compress" field instead, so that the font can be accessed faster.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

lazygames

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 3
    • View Profile
    • LAZY GAMES
Re: [iOS] problem with ttf fonts
« Reply #2 on: June 06, 2011, 11:19:13 AM »

Thank's a lot!
I forget about this settings!
Logged
 

Page created in 0.023 seconds with 21 queries.