// since the glyph path is filled by pattern
cb.beginText();
cb.setFontAndSize(bf, 1);
cb.setTextMatrix(270f, 0f, 0f, 270f, 20f, 100f);
cb.setGrayFill(0.9f);
cb.showText("ABC");
cb.setPatternFill(p);
cb.moveTextWithLeading(0.0f, 0.0f);
cb.showText("ABC");
cb.endText();
cb.setPatternFill(p);