tool:bitmap-font
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판다음 판 | 이전 판 | ||
tool:bitmap-font [2013/06/08 11:54] – kieuns | tool:bitmap-font [2025/01/13 14:20] (현재) – kieuns | ||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | < | ||
+ | Bitmap Font Generator | ||
+ | |||
+ | * 2012/11/11 : 비트맵 폰트 제작 툴, 간단하고 쓰기 좋다. | ||
+ | * 사이트 : [[http:// | ||
+ | * 최근 빌드 : {{: | ||
+ | |||
+ | Bitmap Font Generator : 비트맵 폰트과 튜토리얼 | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | <code csharp> | ||
+ | // ---- AngelCode BmFont XML serializer ---------------------- | ||
+ | // ---- By DeadlyDan @ deadlydan@gmail.com ------------------- | ||
+ | // ---- There' | ||
+ | // ---- Credits to http:// | ||
+ | |||
+ | using System; | ||
+ | using System.IO; | ||
+ | using System.Xml.Serialization; | ||
+ | |||
+ | namespace BmFont | ||
+ | { | ||
+ | [Serializable] | ||
+ | [XmlRoot(" | ||
+ | public class FontFile | ||
+ | { | ||
+ | [XmlElement(" | ||
+ | public FontInfo Info | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlElement(" | ||
+ | public FontCommon Common | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlArray(" | ||
+ | [XmlArrayItem(" | ||
+ | public List< | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlArray(" | ||
+ | [XmlArrayItem(" | ||
+ | public List< | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlArray(" | ||
+ | [XmlArrayItem(" | ||
+ | public List< | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [Serializable] | ||
+ | public class FontInfo | ||
+ | { | ||
+ | [XmlAttribute(" | ||
+ | public String Face | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Size | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Bold | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Italic | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public String CharSet | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Unicode | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 StretchHeight | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Smooth | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 SuperSampling | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | private Rectangle _Padding; | ||
+ | [XmlAttribute(" | ||
+ | public String Padding | ||
+ | { | ||
+ | get | ||
+ | { | ||
+ | return _Padding.X + "," | ||
+ | } | ||
+ | set | ||
+ | { | ||
+ | String[] padding = value.Split(',' | ||
+ | _Padding = new Rectangle(Convert.ToInt32(padding[0]), | ||
+ | } | ||
+ | } | ||
+ | |||
+ | private Point _Spacing; | ||
+ | [XmlAttribute(" | ||
+ | public String Spacing | ||
+ | { | ||
+ | get | ||
+ | { | ||
+ | return _Spacing.X + "," | ||
+ | } | ||
+ | set | ||
+ | { | ||
+ | String[] spacing = value.Split(',' | ||
+ | _Spacing = new Point(Convert.ToInt32(spacing[0]), | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 OutLine | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [Serializable] | ||
+ | public class FontCommon | ||
+ | { | ||
+ | [XmlAttribute(" | ||
+ | public Int32 LineHeight | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Base | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 ScaleW | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 ScaleH | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Pages | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Packed | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 AlphaChannel | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 RedChannel | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 GreenChannel | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 BlueChannel | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [Serializable] | ||
+ | public class FontPage | ||
+ | { | ||
+ | [XmlAttribute(" | ||
+ | public Int32 ID | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public String File | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [Serializable] | ||
+ | public class FontChar | ||
+ | { | ||
+ | [XmlAttribute(" | ||
+ | public Int32 ID | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 X | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Y | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Width | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Height | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 XOffset | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 YOffset | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 XAdvance | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Page | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Channel | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | [Serializable] | ||
+ | public class FontKerning | ||
+ | { | ||
+ | [XmlAttribute(" | ||
+ | public Int32 First | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Second | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | |||
+ | [XmlAttribute(" | ||
+ | public Int32 Amount | ||
+ | { | ||
+ | get; | ||
+ | set; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | public class FontLoader | ||
+ | { | ||
+ | public static FontFile Load(String filename) | ||
+ | { | ||
+ | XmlSerializer deserializer = new XmlSerializer(typeof(FontFile)); | ||
+ | TextReader textReader = new StreamReader(filename); | ||
+ | FontFile file = (FontFile)deserializer.Deserialize(textReader); | ||
+ | textReader.Close(); | ||
+ | return file; | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ |