如何简单地为给定字体的字母表中的每个字符生成位图?

发布于 2024-12-25 05:17:31 字数 253 浏览 2 评论 0原文

我想生成一个 .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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

芯好空 2025-01-01 05:17:31

我不清楚您是否正在寻找解决此问题的工具或解决此问题的代码。

这是一个可能适合您的工具:
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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文