Skip to content

WindFrost-CSFT/XnaFontRebuilder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

XnaFontRebuilder

将 BMFont 导出的 XML 格式 .fnt 转换为项目使用的 XnaFont 二进制 .txt。

功能

  • 读取 BMFont XML 文件中的 common 和 chars 信息
  • 生成与原 Android 工具兼容的 XnaFont .txt 输出
  • 支持行高覆盖
  • 支持拉丁字符补偿
  • 支持全字符间距补偿

运行环境

  • .NET 8 SDK 或运行时

构建

dotnet build

用法

dotnet run --project XnaFontRebuilder.csproj -- input.fnt

也可以显式指定输出文件和参数:

dotnet run --project XnaFontRebuilder.csproj -- input.fnt output.txt --line-height 30 --latin-compensation 0.5 --character-spacing-compensation 5

参数说明

  • input.fnt: 输入的 BMFont XML 文件
  • output.txt: 输出文件,默认与输入同目录同名 .txt
  • --line-height: 行高覆盖,传 0 表示沿用 FNT 内的 lineHeight
  • --latin-compensation: 对 ASCII 33 到 127 额外增加的左右间距
  • --character-spacing-compensation: 对所有字符统一增加的字距

默认值

  • 行高: 30
  • 拉丁补偿: 0.5
  • 全字符间距补偿: 0

About

Create a txt file for terraria pe font with bmfont

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages