Imported new font, and created odd errors

Status
Not open for further replies.

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
I recently found a font I liked, installed it, and put it into main for use in the game.

The result was every line break or new line for items created a "box" before the next line of text.  This

also is happening with changing equipment next to the number on stats.





Have I broken something?  
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
no, the box can be there because of two possibilities:


1) it could be that you're missing a patch that should be in all newer project (it's a script, just search for font patch on this forum)


2) the font you've choosen is incomplete and missing one letter, the letter that is used at that part of the text.


the second possibility is very common with free, user-made fonts, and especially when non-english letters are used. About half the "free fonts" on the internet are unusable für Germans for example, because those fonts are missing the (German) letters of äöüÄÖÜß and are displaying a fontbox whereever those are used in the texts...
 
Last edited by a moderator:

Yato

(aka Racheal)
Veteran
Joined
Mar 17, 2012
Messages
825
Reaction score
346
Primarily Uses
This contains the snippet to fix the first issue, which is the junk new line symbol at the end of the help window.

For the second issue, you're going to want to edit Window_EquipStatus. Lines 82 to 88 you will find the following:

Code:
  #--------------------------------------------------------------------------  # * Draw Right Arrow  #--------------------------------------------------------------------------  def draw_right_arrow(x, y)    change_color(system_color)    draw_text(x, y, 22, line_height, "→", 1)  end
"→" is the symbol that does not exist in the font you've chosen. You can change it to ">" or something like that which should exist.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Much obliged, thank you both for your time =3
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Alternatively, if you want to keep the "→" character, you can edit the .TTF file XD. Type Light is the only free editor I found that can re-export to .TTF, but it's pretty straightforward ^^.
 
Last edited by a moderator:

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Nice.  Unfortunately there is another slight issue.  No matter what size I make the font, it's tapering off the left hand side of the menu and start menu:



Do I need to change anything else to move the text over a little?  The I's and S's seem to go one pixel too far.  This persists even when I select a smaller size.

I did a quick PS of the font to ensure it was cut off:

 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
I'll write up a scriptlet to adjust the x values of the text in Window_MenuCommand later today ^^, I had a similar issue, but it should be a simple fix :) .
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
class Window_MenuCommand < Window_Command #-------------------------------------------------------------------------- # * Get Rectangle for Drawing Items (for Text) #-------------------------------------------------------------------------- def item_rect_for_text(index) rect = item_rect(index) rect.x += 10 # Change this to move the text, default is 4 rect.width -= 8 rect endendTry adding this scriptlet and let me know if it fixes the problem ^^.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Okay thank you.  I am installing it in Window_Menu command at the top, bottom, or am I replacing the first section with it?

EDIT: Yeah, I am not seeing the default of 4 anywhere in those lines in the window menu command script.  I'll keep looking.

Ah there it is in windows select able.  Line 180.  I think that's right.

No unfortunately changing that 4 to a 10 still generates the same issue with the opening menu and menu text.  Bummer =(

I see what it did though, it expanded the window itself which is nice.  It must be an inherent problem in the free font.  I may need to go into an editor and make sure, though in Photoshop it doesn't cut off.  Weird.  
 
Last edited by a moderator:

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
Oh, you should add scriptlets under Materials ^^, overwriting the defaults may lead to more things being changed than you might like :S.

That's odd that it didn't fix it though... can you link me the .TTF? It may be an issue with drawing the Font within the Rect rather than the Rect for the text being too far left.

EDIT: If it is the Font, this might fix it:

Code:
class Window_MenuCommand < Window_Command  #--------------------------------------------------------------------------  # * Draw Item  #--------------------------------------------------------------------------  def draw_item(index)    change_color(normal_color, command_enabled?(index))    draw_text(item_rect_for_text(index), " "+command_name(index), alignment)  endend
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Do a search for cached fonts scripts. This is a known issue and has nothing to do with the starting position of the text.
 

DuncanS

Veteran
Veteran
Joined
Sep 18, 2013
Messages
160
Reaction score
96
First Language
English
Primarily Uses
@Shaz - if you're talking about Mithran's script then altering the Rect width could fix the issue. A space should also fix it, since the problem is overzealous text-shrinking due to Rect size. My assumption was that that issue was only a problem in cases where menu items were close to their containing Rect width.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Thank you Shaz and DuncanS, that script you recommended fixed my final problem with the importing of text.   I'm all set =3
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
Re-opened at OP's request.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Thank you, here is the new problem:



I cannot get rid of the box ontop of the number.  I am certain it is a missing character that the previous fixes do not address.



I've gone directly into Window_Itemlist to see if I can replace the character manually but the line I thought controlled the number of items does not.

Is there another line or window that controls the display of the number of items?  Can I remove the mid floating  x Latin character(In the previous screen shots item screen) from the window scripts so that box isn't displayed with the number in the current item screen?  

EDIT:  The specific character causing the issue is "modifier letter cross accent", and I'd like to eliminate it completely from the draw item number.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Yes, you can remove those characters from the script, or just replace them with a regular 'x'. It looks like you've already done it in that particular script.


If you've changed that line in the screenshot and it's still appearing, just do a global search (control+shift+f) for the character, and see if it can find it in any other scripts.
 

Bonkers

Get ready to be Wowed!
Restaff
Joined
May 26, 2013
Messages
2,941
Reaction score
2,897
First Language
English
Primarily Uses
RMMV
Yes, you can remove those characters from the script, or just replace them with a regular 'x'. It looks like you've already done it in that particular script.

If you've changed that line in the screenshot and it's still appearing, just do a global search (control+shift+f) for the character, and see if it can find it in any other scripts.
Oh my that is extremely helpful =)  Thank you.  Found exactly where it was and what was causing it.  I was using a regular search, and global search is so much nicer.

This thread can be locked, hopefully for good.
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,864
Messages
1,017,056
Members
137,573
Latest member
nikisknight
Top