如何简单地为给定字体的字母表中的每个字符生成位图?
我想生成一个 .bmp 文件,其中每个字符都采用特定字体。
互联网上曾经有一个名为Font 2 BMP
的程序,但不知何故现在无处可寻。
这对我来说是一个完美的解决方案,因为它用字符的 ASCII 代码打印 .bmp。
有人可以为此提出解决方案吗?例如,如何在 C++(或 C#)中执行此操作,因为我需要在 C++ 中的项目中使用它,这对我来说非常容易实现。或者建议替代 Font 2 BMP
。
I want to generate a .bmp file with every character in a specific font.
There used to be a program in the internet called Font 2 BMP
but somehow it is now nowhere to be found.
It was a perfect solution for me because it printed the .bmps with the character's ASCII code.
Can someone suggest a solution for this ? For instance how to do it in C++ (or C#) as I need this for my project in C++ and this would be really easy for me to implement. Or suggest alternative to Font 2 BMP
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不清楚您是否正在寻找解决此问题的工具或解决此问题的代码。
这是一个可能适合您的工具:
http://www.angelcode.com/products/bmfont/
我不知道什么但许多平台(例如 .NET、Cocoa)允许您创建渲染上下文,在其上绘制字母,然后将该上下文保存为位图/png 文件。
I'm unclear if you're looking for a tool to solve this problem, or the code to solve it.
Here's a tool that might work for you:
http://www.angelcode.com/products/bmfont/
I don't know what platform you're on, but many platforms (e.g. .NET, Cocoa) allow you to create a Rendering Context, draw a letter onto it, then save that context as a bitmap/png file.