Imported new font, and created odd errors

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.

a1byooO.jpg


O8ZU5Rs.jpg


Have I broken something?  
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...
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.
Much obliged, thank you both for your time =3
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 ^^.
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:

FX0OIvZ.jpg


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:

P698raY.jpg
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 🙂 .
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 ^^.
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.  
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
Do a search for cached fonts scripts. This is a known issue and has nothing to do with the starting position of the text.
@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.
Thank you Shaz and DuncanS, that script you recommended fixed my final problem with the importing of text.   I'm all set =3
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.
Re-opened at OP's request.
Thank you, here is the new problem:

991VFML.jpg


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.

GsutC9q.jpg


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.
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.
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.
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.

Original thread: https://forums.rpgmakerweb.com/threads/imported-new-font-and-created-odd-errors.24315/