Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ingame Text is broken (Mac) #508

Closed
zorro300 opened this issue Feb 27, 2012 · 39 comments
Closed

Ingame Text is broken (Mac) #508

zorro300 opened this issue Feb 27, 2012 · 39 comments

Comments

@zorro300
Copy link
Contributor

On Mac Os x Lion the text ingame is broken on the latest build 183.

http://i.imgur.com/xuKjP.png
http://i.imgur.com/pu3hp.png

Is this also happening on other OS ?

For me it happens on the .dmg build for mac and on the .jar build

@godleydemon
Copy link
Collaborator

its because some had the bright idea to put the text into unicode. Which broke it pretty much. Because its not broken in Win7 but it looks horrid.

@Daniel-Griffiths
Copy link
Contributor

I am also getting the same issue

@ervilsoft
Copy link
Contributor

Yea, lowercase chars are not displayed correctly and on Win7 they look awful

@zorro300
Copy link
Contributor Author

Please fix it then :)

@danielduner
Copy link
Contributor

This is a bug in Mac only: the awt colors work differently for some reason.

The Windows thing is expected behaviour. Just change texts.properties to use uppercase if you don't want the game to use the fallback font.

@danielduner
Copy link
Contributor

I would consider this a bug in the Mac implementation of Java/AWT. But I have no way of testing how this quirk/bug works, as MacOSX is a non-free operating system that runs on specialized hardware. I will be able to create a work around, but it might take some time (a day or two). For the time being: make sure to change texts.properties to upper-case text where it should be uppercase, which will hide 99% of the problems.

@ghost ghost assigned danielduner Feb 27, 2012
@Daniel-Griffiths
Copy link
Contributor

The best solution is to run Mac OSX in a virtual machine. That way you can at least test it without having to go out and purchase a Mac.

@mkalam-alami
Copy link
Collaborator

A related issue: I noticed encoding problems for special chars (French translation for instance). Impressive work on these fonts anyway, congrats @danielduner

@danielduner
Copy link
Contributor

See #518 for the quick fix of making text upper-case again (by changing texts.properties)

@BubblegumBalloon
I'm not going to pay money for a non-free operating system. But I know how to solve the problem. I'll simply generate the character and shadow on different bitmaps and then merge the two pictures, after I have added the gradient on the main character. It should be very easy to fix once I get the time and it will result in more readable code.

@mkalam-alami
Thank you for noticing :)
I've put quite a bit of work into this code, to really try to imitate the original fonts. There are a few bugs and oversights left to hammer out, but when I started I never thought it was going to get this good.

Could you create an issue for the encoding problems? It might have to do with not using latin-1 encoding for the .properties files (.properties files are stupidly enough defined to use latin-1 instead of UTF-8). But it's hard to tell without knowing what the problem is.

@mkalam-alami
Copy link
Collaborator

Encoding issue: #521

@Daniel-Griffiths
Copy link
Contributor

@danielduner Ops sorry I totally forgot you would have to buy a disk of the OS before running it in a VM and I totally dont expect you to go out of your way to do that!

Also I really appreciate you taking your time to fix this bug. :)

@danielduner
Copy link
Contributor

@BubblegumBalloon
It's not just a matter of me going out of my way, it's actually against my principles to economically support non-free operating systems :)
But no worries, I will be able to create a work around anyway - thanks to your images.

@Daniel-Griffiths
Copy link
Contributor

If it was up to me I would primarily and probably only use Ubuntu. However I rely on a lot of software which doesn't exist on linux or there is not an equal alternative so thats why I have to use Mac and Windows.

One of the main reasons I use Windows is actually for games. If all the games that ran on windows ran on linux (without the use of something like wine) then I would probably never use it. Thats why I always support the humble bundles, to try and push more games to linux.

@danielduner
Copy link
Contributor

Sounds good, hopefully you can move to Ubuntu over time :)
Anyway, this is a cross platform game and I will do my best to support all platforms!

@godleydemon
Copy link
Collaborator

I really don't like the lower case characters. I'd rather see them upper case in game. But I think I know why its done this way, for better support for other languages. :p

@danielduner
Copy link
Contributor

@godleydemon
The game shows what is entered in texts.properties. Right now all that text is lower-case, so the game shows lower-case. This will be fixed by: #518

@danielduner
Copy link
Contributor

The problem with the bad Mac font may be solved now in SHA: d6dc4e6

Could someone with a Mac check this?

@Daniel-Griffiths
Copy link
Contributor

Its not fixed but it is improved. :)

@danielduner
Copy link
Contributor

Thank you. I will keep working on it.

@danielduner
Copy link
Contributor

I have identified the problem.

I am using the default SansSerif font, which is different for different operating systems. It looks great on Ubuntu (11.04), like crap on Windows and horrible on Mac. I will simply have to set the font to something more specific than "default sansserif"

This is what I get:

@danielduner
Copy link
Contributor

@BubblegumBalloon or @zorro300 or some other Mac-user
Can you check if the Mac problem is solved now? And post a picture?

I have added font-files to the project (from the Ubuntu font family), instead of relying on the operating system's fonts.
SHA: 34e641c

@Daniel-Griffiths
Copy link
Contributor

Somehow it still doesn't work sorry, im not sure if it looks better than in the last pic. I think its the same.

@danielduner
Copy link
Contributor

I.. I.. I don't even..

Do you have the project up and running in Eclipse? Can you run some test-code for me?

@Daniel-Griffiths
Copy link
Contributor

Yeah sure. :)

@danielduner
Copy link
Contributor

Can you use the change in this commit:
SHA: a1268d7

Then run the game (just the title screen) and paste the System.out output here

@Daniel-Griffiths
Copy link
Contributor

This is what I got:

Map info added: /levels/level1.bmp(vanilla)
Map info added: /levels/AsymeTrical.bmp(vanilla)
Map info added: /levels/CataBOMB.bmp(vanilla)
Map info added: /levels/Siege.bmp(vanilla)
Map info added: /levels/TheMaze.bmp(vanilla)
Map info added: /levels/Circular Shapes.bmp(vanilla)
Map info added: /levels/BlackHole.bmp(vanilla)
Map info added: /levels/RailRoads.bmp(vanilla)
Map info added: /levels/DevMap.bmp(vanilla)
Looking for levels: /Users/Daniel/Library/Application Support/mojam/levels
Found level: . DS_Store

Starting up SoundSystem...
Initializing Java Sound
(The Java Sound API. For more information, see http://java.sun.com/products/java-media/sound/)
JavaSound initialized.

t: Ubuntu-Bold
a: Ubuntu-Bold
r: Ubuntu-Bold
o: Ubuntu-Bold
s: Ubuntu-Bold
i: Ubuntu-Bold
n: Ubuntu-Bold
w: Ubuntu-Bold
p: Ubuntu-Bold
l: Ubuntu-Bold
y: Ubuntu-Bold
e: Ubuntu-Bold
v: Ubuntu-Bold
d: Ubuntu-Bold
x: Ubuntu-Bold

@Daniel-Griffiths
Copy link
Contributor

I even tried manually installing the ubuntu fonts afterwards and trying it again but it still didnt work. :/

@danielduner
Copy link
Contributor

Thank you. The font seems to be loading correctly.

I'm at a bit of a loss. I'll see if I can think of something later. In the mean time, we'll have to prioritize #518

@Daniel-Griffiths
Copy link
Contributor

No worries, at least the font is readable now. :)

@danielduner
Copy link
Contributor

Okay, a final attempt for the night. Can you pull Maescool/master and see if the problem is solved. Or at least if something looks different?

@Daniel-Griffiths
Copy link
Contributor

You are a genius you fixed it! :)

@danielduner
Copy link
Contributor

(anti-aliasing was turned on by default in your Java version but not in mine)

@danielduner
Copy link
Contributor

Aw, crap, the shadows are still a bit off. But we're getting closer!

@danielduner danielduner reopened this Feb 28, 2012
@Daniel-Griffiths
Copy link
Contributor

Ah yes your right! The priority can be knocked down now since the text is perfectly fine but its slightly 'off' compared to how it looks on other OS's

It actually looks like the font is a little different too.

@danielduner
Copy link
Contributor

Good idea! Priority set to low.

The font is new, so it should look a bit different. I will rewrite the shadow system and then post an image of what it looks like for me.

@danielduner
Copy link
Contributor

Try it now?

It's not perfect for me, but pretty good:

@Daniel-Griffiths
Copy link
Contributor

Heres how it looks now


The shadows have definitely changed, I would say it looks better.

@danielduner
Copy link
Contributor

Now it looks better on Mac than on Linux facepalm
For some reason things are still rendered differently on the different platforms.

But mission accomplished! Thank you for your excellent and speedy assistance!

@Daniel-Griffiths
Copy link
Contributor

No probs Daniel. Thanks for making the font better. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants