사용자 도구

사이트 도구


tool:bitmap-font

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판이전 판
다음 판
이전 판
tool:bitmap-font [2020/02/21 14:21] kieunstool:bitmap-font [2025/01/13 14:20] (현재) kieuns
줄 1: 줄 1:
-비트맵 폰트+<title>비트맵 폰트 제작</title>
  
 Bitmap Font Generator Bitmap Font Generator
줄 28: 줄 28:
 { {
   [Serializable]   [Serializable]
-@h@ [XmlRoot ( "font" )] +  [XmlRoot("font")] 
- public class FontFile +  public class FontFile 
-+  
- [XmlElement ( "info" )] +    [XmlElement("info")] 
- public FontInfo Info +    public FontInfo Info 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlElement ( "common" )] +    [XmlElement("common")] 
- public FontCommon Common +    public FontCommon Common 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlArray ( "pages" )] +    [XmlArray("pages")] 
- [XmlArrayItem ( "page" )] +    [XmlArrayItem("page")] 
- public List<FontPage> Pages +    public List<FontPage> Pages 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlArray ( "chars" )] +    [XmlArray("chars")] 
- [XmlArrayItem ( "char" )] +    [XmlArrayItem("char")] 
- public List<FontChar> Chars +    public List<FontChar> Chars 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlArray ( "kernings" )] +    [XmlArray("kernings")] 
- [XmlArrayItem ( "kerning" )] +    [XmlArrayItem("kerning")] 
- public List<FontKerning> Kernings +    public List<FontKerning> Kernings 
- +    
- get; +      get; 
- set; +      set; 
- +    
- }+  }
  
- [Serializable] +  [Serializable] 
- public class FontInfo +  public class FontInfo 
-+  
- [XmlAttribute ( "face" )] +    [XmlAttribute("face")] 
- public String Face +    public String Face 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "size" )] +    [XmlAttribute("size")] 
- public Int32 Size +    public Int32 Size 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "bold" )] +    [XmlAttribute("bold")] 
- public Int32 Bold +    public Int32 Bold 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "italic" )] +    [XmlAttribute("italic")] 
- public Int32 Italic +    public Int32 Italic 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "charset" )] +    [XmlAttribute("charset")] 
- public String CharSet +    public String CharSet 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "unicode" )] +    [XmlAttribute("unicode")] 
- public Int32 Unicode +    public Int32 Unicode 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "stretchH" )] +    [XmlAttribute("stretchH")] 
- public Int32 StretchHeight +    public Int32 StretchHeight 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "smooth" )] +    [XmlAttribute("smooth")] 
- public Int32 Smooth +    public Int32 Smooth 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "aa" )] +    [XmlAttribute("aa")] 
- public Int32 SuperSampling +    public Int32 SuperSampling 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- private Rectangle _Padding; +    private Rectangle _Padding; 
- [XmlAttribute ( "padding" )] +    [XmlAttribute("padding")] 
- public String Padding +    public String Padding 
- +    
- get +      get 
- +      
- return _Padding.X + "," + _Padding.Y + "," + _Padding.Width + "," + _Padding.Height; +        return _Padding.X + "," + _Padding.Y + "," + _Padding.Width + "," + _Padding.Height; 
- +      
- set +      set 
- +      
- String[] padding = value.Split ( ',' ); +        String[] padding = value.Split(','); 
- _Padding = new Rectangle ( Convert.ToInt32 ( padding[0] ), Convert.ToInt32 ( padding[1] ), Convert.ToInt32 ( padding[2] ), Convert.ToInt32 ( padding[3] ) ); +        _Padding = new Rectangle(Convert.ToInt32(padding[0]), Convert.ToInt32(padding[1]), Convert.ToInt32(padding[2]), Convert.ToInt32(padding[3])); 
- +      
- }+    }
  
- private Point _Spacing; +    private Point _Spacing; 
- [XmlAttribute ( "spacing" )] +    [XmlAttribute("spacing")] 
- public String Spacing +    public String Spacing 
- +    
- get +      get 
- +      
- return _Spacing.X + "," + _Spacing.Y; +        return _Spacing.X + "," + _Spacing.Y; 
- +      
- set +      set 
- +      
- String[] spacing = value.Split ( ',' ); +        String[] spacing = value.Split(','); 
- _Spacing = new Point ( Convert.ToInt32 ( spacing[0] ), Convert.ToInt32 ( spacing[1] ) ); +        _Spacing = new Point(Convert.ToInt32(spacing[0]), Convert.ToInt32(spacing[1])); 
- +      
- }+    }
  
- [XmlAttribute ( "outline" )] +    [XmlAttribute("outline")] 
- public Int32 OutLine +    public Int32 OutLine 
- +    
- get; +      get; 
- set; +      set; 
- +    
- }+  }
  
- [Serializable] +  [Serializable] 
- public class FontCommon +  public class FontCommon 
-+  
- [XmlAttribute ( "lineHeight" )] +    [XmlAttribute("lineHeight")] 
- public Int32 LineHeight +    public Int32 LineHeight 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "base" )] +    [XmlAttribute("base")] 
- public Int32 Base +    public Int32 Base 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "scaleW" )] +    [XmlAttribute("scaleW")] 
- public Int32 ScaleW +    public Int32 ScaleW 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "scaleH" )] +    [XmlAttribute("scaleH")] 
- public Int32 ScaleH +    public Int32 ScaleH 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "pages" )] +    [XmlAttribute("pages")] 
- public Int32 Pages +    public Int32 Pages 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "packed" )] +    [XmlAttribute("packed")] 
- public Int32 Packed +    public Int32 Packed 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "alphaChnl" )] +    [XmlAttribute("alphaChnl")] 
- public Int32 AlphaChannel +    public Int32 AlphaChannel 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "redChnl" )] +    [XmlAttribute("redChnl")] 
- public Int32 RedChannel +    public Int32 RedChannel 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "greenChnl" )] +    [XmlAttribute("greenChnl")] 
- public Int32 GreenChannel +    public Int32 GreenChannel 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "blueChnl" )] +    [XmlAttribute("blueChnl")] 
- public Int32 BlueChannel +    public Int32 BlueChannel 
- +    
- get; +      get; 
- set; +      set; 
- +    
- }+  }
  
- [Serializable] +  [Serializable] 
- public class FontPage +  public class FontPage 
-+  
- [XmlAttribute ( "id" )] +    [XmlAttribute("id")] 
- public Int32 ID +    public Int32 ID 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "file" )] +    [XmlAttribute("file")] 
- public String File +    public String File 
- +    
- get; +      get; 
- set; +      set; 
- +    
- }+  }
  
- [Serializable] +  [Serializable] 
- public class FontChar +  public class FontChar 
-+  
- [XmlAttribute ( "id" )] +    [XmlAttribute("id")] 
- public Int32 ID +    public Int32 ID 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "x" )] +    [XmlAttribute("x")] 
- public Int32 X +    public Int32 X 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "y" )] +    [XmlAttribute("y")] 
- public Int32 Y +    public Int32 Y 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "width" )] +    [XmlAttribute("width")] 
- public Int32 Width +    public Int32 Width 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "height" )] +    [XmlAttribute("height")] 
- public Int32 Height +    public Int32 Height 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "xoffset" )] +    [XmlAttribute("xoffset")] 
- public Int32 XOffset +    public Int32 XOffset 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "yoffset" )] +    [XmlAttribute("yoffset")] 
- public Int32 YOffset +    public Int32 YOffset 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "xadvance" )] +    [XmlAttribute("xadvance")] 
- public Int32 XAdvance +    public Int32 XAdvance 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "page" )] +    [XmlAttribute("page")] 
- public Int32 Page +    public Int32 Page 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "chnl" )] +    [XmlAttribute("chnl")] 
- public Int32 Channel +    public Int32 Channel 
- +    
- get; +      get; 
- set; +      set; 
- +    
- }+  }
  
- [Serializable] +  [Serializable] 
- public class FontKerning +  public class FontKerning 
-+  
- [XmlAttribute ( "first" )] +    [XmlAttribute("first")] 
- public Int32 First +    public Int32 First 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "second" )] +    [XmlAttribute("second")] 
- public Int32 Second +    public Int32 Second 
- +    
- get; +      get; 
- set; +      set; 
- }+    }
  
- [XmlAttribute ( "amount" )] +    [XmlAttribute("amount")] 
- public Int32 Amount +    public Int32 Amount 
- +    
- get; +      get; 
- set; +      set; 
- +    
- }+  }
  
- public class FontLoader +  public class FontLoader 
-+  
- public static FontFile Load ( String filename ) +    public static FontFile Load(String filename) 
- +    
- XmlSerializer deserializer = new XmlSerializer ( typeof ( FontFile ) ); +      XmlSerializer deserializer = new XmlSerializer(typeof(FontFile)); 
- TextReader textReader = new StreamReader ( filename ); +      TextReader textReader = new StreamReader(filename); 
- FontFile file = ( FontFile ) deserializer.Deserialize ( textReader ); +      FontFile file = (FontFile)deserializer.Deserialize(textReader); 
- textReader.Close ( ); +      textReader.Close(); 
- return file; +      return file; 
- +    
- }+  }
 } }
 </code> </code>
tool/bitmap-font.1582262461.txt.gz · 마지막으로 수정됨: 2024/04/23 22:42 (바깥 편집)