Wicket ShieldUI条码文本设置字体大小
我正在尝试生成一个条形码,使用用于Wicket的ShieldUI 对于条形码,我还需要显示文本 我试图设置文本的大小,但输出不好,条形码不知怎的溢出了文本大小的设置Wicket ShieldUI条码文本设置字体大小,wicket,barcode,font-size,shieldui,Wicket,Barcode,Font Size,Shieldui,我正在尝试生成一个条形码,使用用于Wicket的ShieldUI 对于条形码,我还需要显示文本 我试图设置文本的大小,但输出不好,条形码不知怎的溢出了文本大小的设置 Barcode barcode = new Barcode(fieldName); BarcodeOptions options = barcode.getOptions(); options.setValue("123456"); options.setType(BarcodeOptions.Type.CODE_128); op
Barcode barcode = new Barcode(fieldName);
BarcodeOptions options = barcode.getOptions();
options.setValue("123456");
options.setType(BarcodeOptions.Type.CODE_128);
options.setHeight(30);
options.setWidth(120);
options.text.enabled=true;
options.text.style.setFontSize("8"); //if I remove this, the barcode
//shows ok, but the textsize is not the one that I desire
item.add(barcode);
以下是HTML:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:wicket="http://wicket.apache.org/" lang="en" xml:lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css"
href="egp/css/shieldui-all.min.css" />
<script type="text/javascript" src="egp/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="egp/js/shieldui-all.min.js"></script>
<script type="text/javascript" src="egp/js/shieldui-barcode.min.js"></script>
<wicket:head>
</wicket:head>
</head>
<body>
<table wicket:id="forEach">
<tr>
<td>
<div
wicket:id="barcode">
</div>
</td>
</tr>
</table>
</body>
</html>
结果是:
我也注意到了这个问题,并向ShieldUI报告。他们上传了一个补丁。通过将fontSize从字符串更改为整数,解决了此问题。可能您需要下载最新版本并进行测试