// just for this micro-demo.
BitmapFont font = new BitmapFont();
font.setCharSet(new BitmapCharacterSet());
font.setPages(new Material[0]);
// in game it's loaded with AssetManager, of course
BitmapText text = new BitmapText(font);
text.setText("\\#FFF#");
Exception in thread "main" java.lang.NegativeArraySizeException
at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:68)
at java.lang.StringBuilder.<init>(StringBuilder.java:101)
at com.jme3.font.ColorTags.setText(ColorTags.java:80)
at com.jme3.font.Letters.setText(Letters.java:68)
at com.jme3.font.BitmapText.setText(BitmapText.java:181)
ColorTags.java sample
// ColorTags.java:80
StringBuilder builder = new StringBuilder(charSeq.length()-7);
why 7? I suspect, it expects color tag in \#RGBA#
(7 characters) and doesnāt count that \#RGB#
(6 characters) is valid too.
Looks like itās safe to replace this 7 number with 6. Please confirm and Iāll create PR.
PS: affected jME version is 3.3.0-stable.