You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Andrew Kharchuk <ak...@ukraina.com> on 2004/07/30 16:36:21 UTC

FontName and boldness

The piece of code
        HSSFFont font = wb.createFont();
        font.setFontHeightInPoints((short) 10);
        font.setFontName("Arial");
        font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
doesn't create bold font.

The following code does:
        HSSFFont font = wb.createFont();
        font.setFontHeightInPoints((short) 10);
        font.setFontName(HSSFFont.FONT_ARIAL);
        font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);

If I create Verdana or Times Roman the first example gives needed result.

Am I doing something wrong?

Best regards,
    Andrew