Reputation:
Recently I just tested a simple java application which has got a JTextPane
shows some simple utf-8 html content.
Everything is working perfect under windows, and Linux, simple not in Mac.
I'm sure this is not belong to fonts because all components render the same ut8-8 data correctly, except JTextPane.(also other applications don't have such this problem)
text render in windows/linux(correct):
text render in Mac(incorrect):
So the question is, is it kinda bug in MAC? do both windows and mac JVM use same source code and method for rendering text in JTextPane?
Thanks in advance.
Upvotes: 0
Views: 288
Reputation: 57381
It could be issue with font. Physical font used to represent Logical font.
Read here and here. In simple words there are logical fonts (Monospaced
is used to represent text with no font defined in the DefaultStyledDocument
) which is represented by platform dependent physical font.
Try to figure out which physical font is ised in your case. Also try to set another font via setCharacterAttributes()
and see whether the representation is changed.
Upvotes: 1