Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: SoundGuy on May 23, 2009, 11:30:22 PM

Title: big space when editing text in the editor control
Post by: SoundGuy on May 23, 2009, 11:30:22 PM
Hey, i found a weird behavior- when the player is entering something in an editor field, and goes backwards to edit it - there's a very strange space (like 5 single spaces) where the cursor should be.

i tried different fonts but that's not it.

any clues as to what's causing it ?

Oded
Title: Re: big space when editing text in the editor control
Post by: Mnemonic on May 25, 2009, 12:07:49 PM
Make sure you have both normal and selected font assigned. They are both used to measure text width.
Title: Re: big space when editing text in the editor control
Post by: SoundGuy on May 25, 2009, 12:12:54 PM
they are both assigned and same size.
Title: Re: big space when editing text in the editor control
Post by: SoundGuy on May 25, 2009, 12:15:10 PM
also, the more i hit the left arrow key, the larger the space becomes.

Title: Re: big space when editing text in the editor control
Post by: Mnemonic on May 25, 2009, 12:20:09 PM
No idea then. You're using: bitmap fonts / truetype fonts, utf-8 string table, non-utf-8 string table?
Title: Re: big space when editing text in the editor control
Post by: SoundGuy on May 28, 2009, 02:32:32 PM
Truetype
here's the .FONT file:
Code: [Select]
; $EDITOR_PROJECT_ROOT_DIR$ ..\..\

TTFONT
{
  SIZE = 14

FACE= "Comic Sans MS"
;FILENAME = "fonts\KOMIKAH_.ttf"

;  BOLD = FALSE
  ITALIC = FALSE
  UNDERLINE = FALSE
  STRIKE = FALSE

CHARSET = 0

  COLOR { 0, 0, 0 }
  ALPHA = 255
 
  LAYER
  {
    OFFSET_X = 0
    OFFSET_Y = 0
    COLOR { 0, 0, 0 }
    ALPHA = 255
  }
}



Title: Re: big space when editing text in the editor control
Post by: SoundGuy on May 28, 2009, 02:54:56 PM
(http://corbomitegames.com/spacebug.jpg)
Title: Re: big space when editing text in the editor control
Post by: SoundGuy on June 10, 2009, 03:07:52 PM
any ideas whatsoever?
can you see if you reproduce this with the same .FONT file ? or should I try and take WME_DEMO_3D and try it there?

Title: Re: big space when editing text in the editor control
Post by: robot on April 05, 2010, 05:26:51 PM
hi there! i have the same problem here, do you have a solution for this problem, soundguy?
or at least a workaround?
Title: Re: big space when editing text in the editor control
Post by: Prote1n on April 05, 2010, 05:43:02 PM
it seems that this problem only occur with TTF font

By the way i've not been able to display a selected font (white letter over black background) ...