问题标签 [bitmap-fonts]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
actionscript-3 - As3 Bitmap 字体原生支持?
最近我发现了很多关于位图字体性能增强的视频教程。我很想在我现有的项目中使用,但是我的项目来不及实现八哥框架,只是想知道是否有任何方法可以天真地支持位图字体?
干杯比尔
android - 如何在 libgdx 的舞台上绘制位图字体?
这是我当前在我的 Libgdx 游戏中的关卡上的渲染方法。我正在尝试在关卡的右上角绘制一个 BitmapFont,但我得到的只是一堆白框。
我想将乐谱字体添加到某种演员中,然后执行 scene.addActor(myScore) 但我不知道该怎么做。我按照 Steigert 的教程创建了在 AbstractLevel 类中实例化场景字体的主游戏类,然后由该级别扩展。
到目前为止,我没有使用任何自定义字体,只是空的 new BitmapFont(); 使用默认 Arial 字体。后来我想用我自己的更花哨的字体。
c# - 如何在 C# WinForms 项目中使用旧的 Courier 位图字体?
我正在尝试与此处讨论的完全相同的 RegEdit 克隆项目,就像 Darxis 一样,我被“编辑二进制值”对话框难住了。
我相信使用的字体是原始的Courier(不是Courier New),但由于这是一种老式的位图字体,我不能在现代 C# WinForms 项目中使用它。我已经尝试了我可以在网上找到的所有 TTF 版本的 Courier,但没有一个以与原始版本相同的方式重现 0(即四条直线且没有曲线)。
叫我肛门,但和 Darxis 一样,我希望我的版本具有与 Microsoft 注册表编辑器完全相同的外观。然后除了烦人的向后不兼容问题之外,我为此目的安装的每个 TTF 字体都导致 VS2012 脱口而出“仅支持 TrueType 字体。这不是 TrueType 字体”,这绝对是 BS!
我什至尝试创建一个旧的 GDI LOGFONT 并使用它(如此处所述),这给了我关于非 TrueType 字体的同样可怕的错误消息。那么有没有办法让旧字体(特别是 C:\Windows\Fonts 中的 coure.fon)与 C# 项目一起使用?!对于如此琐碎和愚蠢的事情,我几乎要束手无策了,但在我弄清楚之前,我将无法休息!
非常感谢任何可以帮助我解决这个非常烦人的问题的人:-)
opengl - 位图字体的立即模式
我在 OpenGL 中绘制文本。文本移动和变化非常频繁。
我有一个位图字体图集(png 和 XML 文件),并且能够为字形生成纹理坐标。现在我面临如何渲染四边形。
我突然想到,立即模式将是一种非常方便的方式。管理一个充满不断变化的字形四边形的缓冲区似乎相当麻烦——设置一个池分配器、所有映射和取消映射以更新顶点等。我想知道与立即模式相比的性能改进是否会是这样伟大的。
作为一个球场,一次屏幕上可能不会超过几百个字形。
你怎么看?为此使用立即模式会非常错误吗?
cocos2d-iphone - 如何像老虎机一样为 Lable 上的文本设置动画?
我想在标签文本上执行动画。我需要在标签上显示 10。标签应首先显示以 0 开头,然后 1 ,2 ,3 ....以 10 结尾。
示例:显示数字动画似乎在插槽轮中。
我应该如何做到这一点?cocos 2d有什么技巧吗?
有没有人知道如何做到这一点?
android - 使用 BitmapFont 绘图不显示任何内容
我做错了什么?
为 .fnt 和 .png 使用 BMFont 所以这可能不是问题..
fonts - 如何为 ZPL 语言创建和上传位图字体到 Zbera 热敏打印机?
您能否告诉我创建(上传)ZPL 语言的位图字体到 Zebra 热敏打印机的程序是什么?
事实证明,Zebra 不支持他们的客户端在不同的代码页中使用位图字体。他们的字体包中只有可缩放的字体。
是否可以创建或将 windows 位图字体转换为 FNT 文件并在 ZPL 语言中使用它?
label - BitmapFont in Skin doesn't draw labels correctly
I made a bitmap font using Hiero, called default.fnt
and default.png
. I can use these as a BitmapFont in LibGDX, and draw text with the font without problems, using font.draw()
. But I can't use this font as the default font in a Skin. I've used the uiskin.json file from here(along with the rest of the skin, but I deleted the Droid Sans files before making my own font), because I have no idea how to make one of my own. From what I've read on the Internet, the .json file is correctly set up: it has the line com.badlogic.gdx.graphics.g2d.BitmapFont: { default-font: { file: default.fnt } }
, which should make the default.fnt
the default font for widgets that use the skin. Still, when I run the program, I see this:
There should be a label above the buttons, and the buttons should have text.
If I do this: startGameButton.getStyle().font = font;
, where startGameButton
is one of the buttons, and font
is the BitmapFont
created like this: font = new BitmapFont(Gdx.files.internal("uiskin/default.fnt"), Gdx.files.internal("uiskin/default.png"), false);
, the buttons shows the text properly. I don't want to do this since it feels too much like a hack.
I'm following this tutorial, but I've had to look some things up in later revisions of his code, because LibGDX has changed since it was written.
MenuScreen.java(the screen where there are problems)
Also please tell me if there's a better way to make the menu UI, or if you need other files. The uiskin.json
is linked above.
Thank you.
libgdx - 为什么我要使用单位比例?(Libgdx)
我在 Libgdx github repo 上查看了SuperKaolio示例。它基本上是一个将 Tiled 地图与 Libgdx 集成的测试。他们使用单位比例 1/16,如果我理解正确,这意味着世界不再基于像素网格,而是基于单位网格(每个 16 像素宽)。这是示例中的代码和注释:
我基本上想知道你为什么要这样做。我只是遇到了问题,看不到任何明显的优势。
例如,我遇到的一个问题是添加 BitMap 字体。它根本没有随着背景缩放,字体中的一个像素占据了整个单位。图片在这里。
我正在使用此代码来绘制字体。这是 libgdx 中包含的标准 14 点 arial 字体
java - 文本旋转 libgdx
我想在 libgdx 中旋转 BitmapFont。有关于这个问题的话题。绘制在 libgdx 中旋转的 BitmapFont但是,我尝试的第一个解决方案剪切了我的文本,整个文本都没有出现(对角线剪切)。当它说它应该是 180 度时,它还会将它旋转 90 度。我只是不明白。
代码: