I am trying to reduce the intensity of bold to text. I find only Font.BOLD
for title, axis and labels. Can anyone help me to customise the level of BOLD to a text in JFreeChart
?.
Asked
Active
Viewed 377 times
1

trashgod
- 203,806
- 29
- 246
- 1,045

ch.Joshi elijah
- 103
- 2
- 11
1 Answers
1
As shown here, you can use an AttributedString
for the axis labels. Specify WEIGHT_SEMIBOLD
to get "A moderately heavier weight than WEIGHT_REGULAR
."
AttributedString as = new AttributedString(s);
…
as.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_SEMIBOLD, 0, 1);
as.addAttribute(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD, 1, 2);
In this example, the character a
has WEIGHT_SEMIBOLD
:
In this example, the character a
has WEIGHT_BOLD
:
For reference, AttributedString
is used in the following:

trashgod
- 203,806
- 29
- 246
- 1,045