Codenameone 只看到组件的一半字母-cn1

Codenameone 只看到组件的一半字母-cn1,codenameone,Codenameone,我使用了粗体ttf字体,它可以工作,但只有一半的字母被看到 代码: public void start() { if (current != null) { current.show(); return; } Label testLabel = new Label("Bold Font Not Working"); testLabel.setUIID("smallBold"); Form splashForm = new

我使用了粗体ttf字体,它可以工作,但只有一半的字母被看到

代码:

public void start() {
    if (current != null) {
        current.show();
        return;
    }

    Label testLabel = new Label("Bold Font Not Working");
    testLabel.setUIID("smallBold");

    Form splashForm = new Form(new BorderLayout());
    splashForm.add(BorderLayout.CENTER, BoxLayout.encloseY(testLabel));
    splashForm.show();

    splashForm.revalidate();
}
未选中、选中和按下样式的主题中的UIID

现在看起来怎么样

但是,无需将其包装在boxlayout或flowlayout中,并直接将其添加到带有borderlayout的表单中即可工作。如果表单在boxlayout中,它就不起作用

代码:

public void start() {
    if (current != null) {
        current.show();
        return;
    }

    Label testLabel = new Label("Bold Font Not Working");
    testLabel.setUIID("smallBold");

    Form splashForm = new Form(new BorderLayout());
    splashForm.add(BorderLayout.CENTER, testLabel);// this works
    splashForm.show();

    splashForm.revalidate();
}
标签未包装在其他容器中时的图像


不同的布局方面仅表明组件本身的大小不同,您可以在组件检查器中看到这一点。切割发生是因为图纸超出了首选尺寸。我们需要一份TTF文件的副本来复制它。这是TTF字体:Java很难正确读取这个字体的高度,因为它有负下降。我在Git中提出了一个解决方案,将在周五的下一次更新中部署。Hello@stevehannah它在iOS设备和模拟器中可行,但在android设备中不起作用。我登录了三星j7 prime(安卓7.0版)。我能做些什么让它在android设备上工作吗?