Starting July 30th, you will no longer be able to log in to a Curse account that was not merged with a Twitch account. If you have not yet merged your Curse account with a Twitch account, please do so here! Otherwise, your account and its content will be inaccessible.
The BetterFonts mod adds TrueType/OpenType font support for Minecraft. This mod will use the fonts installed on your system for drawing text instead of the builtin bitmap fonts that come with Minecraft. Languages such as Arabic and Hindi look much better with this mod since both require complex layout that the bitmap fonts simply can't provide. All in-game text will change to use the new fonts including GUIs, the F3 debug screen, chat, and even signs. This mod should have little or no impact on performance.
Unicode Text in Chat:
Starting with 1.3.2, both the regular Minecraft server and CraftBukkit allow using full Unicode text in chat. Unfortunately, the Minecraft client comes with an older version of the LWJGL library which doesn't handle keyboard layouts properly. You will have to to manually update LWJGL to the latest version, if you need Unicode support in chat.
Installation is the same as for any other mod. Extract the contents of the downloaded .zip file into your minecraft.jar, and make sure to delete the META-INF folder inside minecraft.jar. This mod is compatible with OptiFine and MCPatcher, but make sure to install it after either mod. Further install examples below:
If you're using MCPatcher to install the mod instead of manually copying the contents to minecraft.jar, then make sure that BetterFonts is at the end of the mod list:
The source code is available in a GitHub repository and is licensed under the LGPL.
You can have a config file to change the default font and text size this mod uses. If your game is installed in a ".minecraft" directory, then the config file will be ".minecraft/config/BetterFonts.cfg" (the same place ModLoader keeps its config files). Please note that the "config" directory does not go inside minecraft.jar but directly into the game folder. You can either download the config file or look at the example below:
# This is the BetterFonts configuration file. Any lines that start with # are
# comments and get ignored. If the same property name appears multiple times
# in the file, only the last value will be used.
# The font.name property changes the default font used in Minecraft. This can
# be the name of a real font like Times New Roman, or one of Java's logical
# fonts like Serif, SansSerif, or Monospaced. If font.name is missing, the
# default font used will be SansSerif.
#font.name=Times New Roman
# You can use the font.size property to affect how large or small the text
# will appear. This must be an integer greater than zero, and if omitted
# the default size used is 18.
# This property enables anti-aliasing which blurs the edges of the font to
# make it seem less jagged, but this can also make the font seem less sharp.
# The property should be set to either the word "true" or "false, and you'll
# have to experiment with both options to determine which one looks better.
# If font.antialias is missing, the default is to disable anti-aliasing.
# By default, Minecraft draws drop shadow for any text in the GUIs and the
# chat. Setting this to "false" will disable this shadow which can make some
# fonts more readable.
Known Issues & Feature Requests:
These are issues that I plan to eventually fix or feature requests I plan to implement in a future version of the mod. In no particular order:
1) Add a GUI screen for selecting the font in-game instead of having to edit a config file.
2) The CJK unified Han characters are always displayed in the same font, but ideally different fonts would be used for Traditional Chinese, Simplified Chinese, Japanese, and Korean based on the in-game language selection.
3) Bidirectional text editing in the chat message line is broken. You can still type it (with the right keyboard layout) or copy and paste it, but creating text selections in it or moving the cursor through it will look weird.
4) The text is a little distorted at the smallest GUI size, because it is still drawn at the same font point size, and rescaled as an image. The letters should instead be redrawn using a smaller point size.
5) The §k "random text" style code is not supported by this mod, but I've only seen it used for the splash text on the title screen.
6) Allow texture packs to include a BetterFonts config file so they can override the default font selection.
7) If no config file is present, have the mod automatically create a default one.
New version out with support for a config file to change your font options.
Thank you so much for this mod,I love you. If it a wonder that no one has done it before. Keep up the hard work! Would it be possible for you to add bold and italic options to the config? Certain fonts look really good, but would really benefit from being bolded. Thanks!
Will you be releasing an Optifine-integrated version?
Just install this mod after Optifine so it replaces Optifine's FontRenderer. Do you know what exactly Optifine changes in that class? I haven't actually decompiled with Optifine myself. I figured any Optifine improvements wouldn't apply anyway since I'm bypassing most of the rendering code for the bitmap fonts.
Should I look at what is happening to the wrapping, it appear that newlines aren't resetting the width tracker.
Oops, you're right. I'll go ahead and fix that. I just realized that the original trimStringToWidth() ignores spaces and newlines while sizeStringToWidth() does not. But I had implemented both methods to ignore whitespace.
One Example Of A Font That I Can NOT Get To Be Recognized:
Try using "Wide Latin". For some fonts, Java seems to report a different name than what you would see in the OS font list. I'm working on a fix for that because at least one other person had a problem with this.
Also, while I'm here, I haven't checked this in game yet and I didn't see anything posted about it yet but does this also affect fonts used on signs?
One other thing for now. Are you planning on eventually adding a GUI interface to select the font you wish to use in-game?
Yup, signs will get the new font too although the Minecraft client doesn't allow full Unicode yet with signs.
Yes, eventually I would like to add a font selection GUI. Especially since Java screws up some of the font names. I'll probably add a "Select Font..." button to the existing language list GUI because no other mod I've seen uses that so there would be no chance of a conflict.
but, what about server support?
i can not type in arabic in this? it's just shows as "ÇáÓáÇã Úáíßã æÑíãÉ Çááå æÈÑßÇÊå"
but actually i'm typing: "السلام عليكم ورحمة الله وبركاته"
That almost sounds like a keyboard layout issue. I know Windows lets you change the layout individually in each application, and I've done that myself where I'd switch between apps with different keyboard layouts active and then forget which one I'm using.
but when i copy arabic text from notepad to the minecraft chat it shows in arabic but when i press enter it's just blank nothing shows
Now that's definitely a server issue. I'll bet you were connected to a Bukkit server. They are stripping all non Latin-1 characters from chat. However, the standard minecraft server does accept chat in full Unicode now so hopefully Bukkit can fix their server too. I opened BUKKIT-1522 in their bug tracker to address this.
Finally, there's still the issue of bidirectional text editing in the chat line which doesn't work all that well. I'll have to fix that eventually as well.