Răsfoiți Sursa

Text alignment fixes (fixes #168) (#285)

trethaller 7 ani în urmă
părinte
comite
50fb3d957e
7 a modificat fișierele cu 423 adăugiri și 31 ștergeri
  1. 1 0
      .gitignore
  2. 3 8
      h2d/Flow.hx
  3. 1 1
      h2d/Sprite.hx
  4. 25 22
      h2d/Text.hx
  5. 188 0
      samples/Text.hx
  6. 205 0
      samples/res/gravityFont.fnt
  7. BIN
      samples/res/gravityFont.png

+ 1 - 0
.gitignore

@@ -8,3 +8,4 @@ bin
 /hxd/inspect/inspect.min.css
 /samples/build
 /*.xml
+.vscode

+ 3 - 8
h2d/Flow.hx

@@ -369,14 +369,9 @@ class Flow extends Sprite {
 	override function getBoundsRec( relativeTo, out, forSize ) {
 		if( needReflow ) reflow();
 		if( forSize ) {
-			if( !isInline ) {
-				super.getBoundsRec(relativeTo, out, false);
-				// TODO : use proper addBounds instead
-				if( relativeTo == parent && background == null ) {
-					out.xMax += paddingRight + borderWidth;
-					out.yMax += paddingBottom + borderHeight;
-				}
-			} else if( calculatedWidth != 0 )
+			if( !isInline )
+				super.getBoundsRec(relativeTo, out, true);
+			if( calculatedWidth != 0 )
 				addBounds(relativeTo, out, 0, 0, calculatedWidth, calculatedHeight);
 		} else
 			super.getBoundsRec(relativeTo, out, forSize);

+ 1 - 1
h2d/Sprite.hx

@@ -66,7 +66,7 @@ class Sprite {
 
 	/**
 		This is similar to getBounds(parent), but instead of the full content, it will return
-		the size based on the alignement of the Sprite. For instance for a text, getBounds will returns
+		the size based on the alignement of the Sprite. For instance for a text, getBounds will return
 		the full glyphs size whereas getSize() will ignore the pixels under the baseline.
 	**/
 	public function getSize( ?out : h2d.col.Bounds ) : h2d.col.Bounds {

+ 25 - 22
h2d/Text.hx

@@ -23,6 +23,7 @@ class Text extends Drawable {
 	var glyphs : TileGroup;
 
 	var calcDone:Bool;
+	var calcXMin:Int;
 	var calcYMin:Int;
 	var calcWidth:Int;
 	var calcHeight:Int;
@@ -131,12 +132,13 @@ class Text extends Drawable {
 
 	public function calcTextWidth( text : hxd.UString ) {
 		if( calcDone ) {
-			var ow = calcWidth, oh = calcHeight, osh = calcSizeHeight, oy = calcYMin;
+			var ow = calcWidth, oh = calcHeight, osh = calcSizeHeight, ox = calcXMin, oy = calcYMin;
 			initGlyphs(text, false);
 			var w = calcWidth;
 			calcWidth = ow;
 			calcHeight = oh;
 			calcSizeHeight = osh;
+			calcXMin = ox;
 			calcYMin = oy;
 			return w;
 		} else {
@@ -205,7 +207,7 @@ class Text extends Drawable {
 
 	function initGlyphs( text : hxd.UString, rebuild = true, handleAlign = true, lines : Array<Int> = null ) : Void {
 		if( rebuild ) glyphs.clear();
-		var x = 0, y = 0, xMax = 0, prevChar = -1;
+		var x = 0, y = 0, xMax = 0, xMin = 0, prevChar = -1;
 		var align = handleAlign ? textAlign : Left;
 		switch( align ) {
 		case Center, Right:
@@ -216,10 +218,11 @@ class Text extends Drawable {
 			for( i in 0...lines.length )
 				lines[i] = (max - lines[i]) >> k;
 			x = lines.shift();
+			xMin = x;
 		default:
 		}
 		var dl = font.lineHeight + lineSpacing;
-		var calcLines = !rebuild && lines != null;
+		var calcLines = !handleAlign && !rebuild && lines != null;
 		var yMin = 0;
 		var t = splitText(text);
 		for( i in 0...t.length ) {
@@ -236,26 +239,26 @@ class Text extends Drawable {
 			if( cc == '\n'.code ) {
 				if( x > xMax ) xMax = x;
 				if( calcLines ) lines.push(x);
-				if( rebuild )
-					switch( align ) {
-					case Left:
-						x = 0;
-					case Right, Center:
-						x = lines.shift();
-					}
-				else
+				switch( align ) {
+				case Left:
 					x = 0;
+				case Right, Center:
+					x = lines.shift();
+					if( x < xMin ) xMin = x;
+				}
 				y += dl;
 				prevChar = -1;
 			} else
 				prevChar = cc;
 		}
 		if( calcLines ) lines.push(x);
+		if( x > xMax ) xMax = x;
 
+		calcXMin = xMin;
 		calcYMin = yMin;
-		calcWidth = x > xMax ? x : xMax;
-		calcHeight = y > 0 && x == 0 ? y - lineSpacing : y + font.lineHeight;
-		calcSizeHeight = y > 0 && x == 0 ? y + (font.baseLine - dl) : y + font.baseLine;
+		calcWidth = xMax - xMin;
+		calcHeight = y + font.lineHeight;
+		calcSizeHeight = y + (font.baseLine > 0 ? font.baseLine : font.lineHeight);
 		calcDone = true;
 	}
 
@@ -270,7 +273,7 @@ class Text extends Drawable {
 
 	function get_textWidth() {
 		updateSize();
-		return calcWidth;
+		return realMaxWidth >= 0 ? Std.int(realMaxWidth) : calcWidth;
 	}
 
 	function set_maxWidth(w) {
@@ -305,16 +308,16 @@ class Text extends Drawable {
 		super.getBoundsRec(relativeTo, out, forSize);
 		updateSize();
 		var x, y, w : Float, h;
-		if( forSize ) {
-			x = 0;
-			y = 0;
-			w = realMaxWidth >= 0 && textAlign != Left && realMaxWidth > calcWidth ? realMaxWidth : (calcWidth == 0 ? 1 : calcWidth);
+		if ( forSize ) {
+			x = calcXMin;
+			y = calcYMin;
+			w = calcWidth;
 			h = calcSizeHeight;
 		} else {
-			x = 0;
+			x = realMaxWidth >= 0 ? 0 : calcXMin;
 			y = calcYMin;
-			w = calcWidth;
-			h = calcHeight - calcYMin;
+			w = realMaxWidth >= 0 ? realMaxWidth : calcWidth;
+			h = calcHeight;
 		}
 		addBounds(relativeTo, out, x, y, w, h);
 	}

+ 188 - 0
samples/Text.hx

@@ -0,0 +1,188 @@
+import h2d.Drawable;
+import h2d.Flow;
+import h2d.Font;
+import h2d.Graphics;
+import h2d.Sprite;
+import h2d.Text.Align;
+
+class TextWidget extends Sprite
+{
+	public var align: Align;
+	public var textField: h2d.Text;
+	public var back: Graphics;
+	
+	public function new(parent:h2d.Scene, font: Font, str:String, align:h2d.Text.Align){
+		super(parent);
+		this.align = align;
+		back = new Graphics(this);
+
+		var tf = new h2d.Text(font, this);
+		tf.textColor = 0xffffff;
+		tf.textAlign = align;
+		tf.text = str;
+		textField = tf;
+		
+		refreshBounds();
+	}
+	
+	public function refreshBounds() {
+		back.clear();
+		
+		var size = textField.getSize();
+		back.beginFill(0x5050ff,  0.5);
+		back.drawRect(size.x, size.y, size.width, size.height);
+		back.endFill();
+		
+		back.lineStyle(1, 0x50ff50);
+		var bounds = textField.getBounds(this);
+		back.drawRect(bounds.x, bounds.y, bounds.width, bounds.height);
+		
+		back.lineStyle(1, 0xff5050);
+		back.moveTo(bounds.x, bounds.y);
+		back.lineTo(bounds.x + textField.textWidth, bounds.y);
+		back.moveTo(bounds.x, bounds.y);
+		back.lineTo(bounds.x, bounds.y + textField.textHeight);
+	}
+
+	public function setMaxWidth(w:Int) {
+		textField.maxWidth = w;
+		refreshBounds();
+	}
+}
+
+class Text extends hxd.App {
+	
+	var textWidgets:Array<TextWidget> = [];
+	var resizeWidgets: Array<TextWidget> = [];
+
+	override function init() {
+		
+		// Enable global scaling
+		// s2d.scale(1.25);
+
+		var font = hxd.Res.gravityFont.toFont();
+		// var font = hxd.Res.customFont.toFont();
+		
+		var multilineText = "This is a multiline text.\nLorem ipsum dolor";
+		var singleText = "Hello simple text";
+		
+		var yoffset = 10.0;
+
+		function createWidget(str:String, align:h2d.Text.Align) {
+			var w = new TextWidget(s2d, font, str, align);
+			w.y = yoffset;
+			textWidgets.push(w);
+			return w;
+		}
+		
+		// Static single and multiline widgets
+		for (a in [Align.Left, Align.Center, Align.Right]) {
+			var w = createWidget("", a);
+			yoffset += w.textField.textHeight + 10;
+			var w = createWidget(singleText, a);
+			yoffset += w.textField.textHeight + 10;
+			var w = createWidget(multilineText, a);
+			yoffset += w.textField.textHeight + 10;
+		}
+		
+		// Resized widgets
+		yoffset += 20;
+		var longText = "Lorem ipsum dolor sit amet, fabulas repudiare accommodare nec ut. Ut nec facete maiestatis, partem debitis eos id, perfecto ocurreret repudiandae cum no.";
+		for (a in [Align.Left, Align.Center, Align.Right]) {			
+			var w = createWidget(longText, a);
+			w.setMaxWidth(200);
+			resizeWidgets.push(w);
+			yoffset += 100;
+		}
+		
+		// Flows
+		function createText(parent:Sprite, str : String, align:Align) {
+			var tf = new h2d.Text(font, parent);
+			tf.textColor = 0xffffff;
+			tf.textAlign = align;
+			tf.text = str;
+			tf.maxWidth = 150;
+			return tf;
+		}
+
+		function createFlow(parent:Sprite) {
+			var flow = new Flow(parent);
+			flow.debug = true;
+			flow.horizontalSpacing = 5;
+			flow.verticalSpacing = 5;
+			flow.padding = 5;
+			return flow;
+		}
+		
+		
+		yoffset = 0;
+		var flow = createFlow(s2d);
+		flow.verticalAlign = FlowAlign.Middle;
+		createText(flow, singleText, Align.Left);
+		createText(flow, multilineText, Align.Left);
+		
+		yoffset += flow.getBounds().height + 10;
+		
+		var flow = createFlow(s2d);
+		flow.y = yoffset;
+		flow.multiline = false;
+		flow.verticalAlign = FlowAlign.Middle;
+		createText(flow, multilineText, Align.Center);
+		createText(flow, multilineText, Align.Right);
+		
+		yoffset += flow.getBounds().height + 10;
+		
+		var flow = createFlow(s2d);
+		flow.y = yoffset;
+		flow.verticalAlign = FlowAlign.Middle;
+		flow.maxWidth = 150;
+		createText(flow, singleText, Align.Left);
+		createText(flow, multilineText, Align.Center);
+		
+		yoffset += flow.getBounds().height + 10;
+		
+		var flow = createFlow(s2d);
+		flow.y = yoffset;
+		flow.horizontalAlign = FlowAlign.Middle;
+		flow.maxWidth = 150;
+		flow.isVertical = true;
+		createText(flow, singleText, Align.Left);
+		createText(flow, multilineText, Align.Right);
+
+		yoffset += flow.getBounds().height + 10;
+		
+		var flow = createFlow(s2d);
+		flow.y = yoffset;
+		flow.x = 100;
+		flow.horizontalAlign = FlowAlign.Middle;
+		flow.isVertical = true;
+		{
+			var f1 = createFlow(flow);
+			createText(f1, multilineText, Align.Left);
+			var f2 = createFlow(flow);
+			createText(f2, multilineText, Align.Left);
+		}
+		
+		onResize();
+	}
+	
+
+	// if we the window has been resized
+	override function onResize() {
+		for (w in textWidgets) {
+			w.x = s2d.width / (2 * s2d.scaleX);
+		}
+	}
+
+	override function update(dt:Float) {
+		for (w in resizeWidgets) {
+			w.setMaxWidth(Std.int(300 + Math.sin(haxe.Timer.stamp() * 0.5) * 100.0));
+		}
+	}
+
+	static function main() {
+		hxd.Res.initEmbed();
+		new Text();
+	}
+
+}

+ 205 - 0
samples/res/gravityFont.fnt

@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Font size="14" family="Gravity" height="22" style="Regular">
+ <Char width="4" offset="-1 18" rect="0 16 2 2" code=" "/>
+ <Char width="6" offset="1 4" rect="2 2 4 16" code="!"/>
+ <Char width="9" offset="1 4" rect="6 2 8 7" code="&quot;"/>
+ <Char width="14" offset="-1 4" rect="14 2 16 16" code="#"/>
+ <Char width="11" offset="-1 2" rect="30 0 13 20" code="$"/>
+ <Char width="15" offset="0 4" rect="43 2 15 16" code="%"/>
+ <Char width="13" offset="0 4" rect="58 2 14 16" code="&amp;"/>
+ <Char width="5" offset="1 4" rect="72 2 5 7" code="'"/>
+ <Char width="8" offset="1 4" rect="77 2 7 20" code="("/>
+ <Char width="8" offset="0 4" rect="84 2 7 20" code=")"/>
+ <Char width="8" offset="0 4" rect="91 2 8 8" code="*"/>
+ <Char width="13" offset="1 9" rect="99 7 11 11" code="+"/>
+ <Char width="6" offset="1 16" rect="110 14 4 7" code=","/>
+ <Char width="11" offset="1 11" rect="114 9 9 5" code="-"/>
+ <Char width="5" offset="1 16" rect="123 14 4 4" code="."/>
+ <Char width="8" offset="-1 4" rect="127 2 9 16" code="/"/>
+ <Char width="11" offset="0 4" rect="136 2 12 16" code="0"/>
+ <Char width="10" offset="0 4" rect="148 2 9 16" code="1"/>
+ <Char width="12" offset="1 4" rect="157 2 11 16" code="2"/>
+ <Char width="11" offset="-1 4" rect="168 2 12 16" code="3"/>
+ <Char width="12" offset="0 4" rect="180 2 12 16" code="4"/>
+ <Char width="11" offset="0 4" rect="192 2 12 16" code="5"/>
+ <Char width="11" offset="0 4" rect="204 2 12 16" code="6"/>
+ <Char width="11" offset="0 4" rect="216 2 11 16" code="7"/>
+ <Char width="12" offset="0 4" rect="227 2 12 16" code="8"/>
+ <Char width="12" offset="0 4" rect="239 2 12 16" code="9"/>
+ <Char width="5" offset="1 8" rect="251 6 4 12" code=":"/>
+ <Char width="6" offset="1 8" rect="0 26 4 15" code=";"/>
+ <Char width="13" offset="1 8" rect="4 26 11 12" code="&lt;"/>
+ <Char width="13" offset="1 10" rect="15 28 11 9" code="="/>
+ <Char width="13" offset="1 8" rect="26 26 11 12" code=">"/>
+ <Char width="11" offset="0 4" rect="37 22 11 16" code="?"/>
+ <Char width="16" offset="0 6" rect="48 24 16 17" code="@"/>
+ <Char width="12" offset="-1 4" rect="64 22 15 16" code="A"/>
+ <Char width="12" offset="0 4" rect="79 22 12 16" code="B"/>
+ <Char width="14" offset="0 4" rect="91 22 15 16" code="C"/>
+ <Char width="13" offset="0 4" rect="106 22 13 16" code="D"/>
+ <Char width="11" offset="0 4" rect="119 22 11 16" code="E"/>
+ <Char width="11" offset="0 4" rect="130 22 11 16" code="F"/>
+ <Char width="14" offset="0 4" rect="141 22 14 16" code="G"/>
+ <Char width="13" offset="0 4" rect="155 22 13 16" code="H"/>
+ <Char width="6" offset="1 4" rect="168 22 4 16" code="I"/>
+ <Char width="9" offset="0 4" rect="172 22 8 16" code="J"/>
+ <Char width="13" offset="0 4" rect="180 22 14 16" code="K"/>
+ <Char width="10" offset="0 4" rect="194 22 11 16" code="L"/>
+ <Char width="17" offset="1 4" rect="205 22 15 16" code="M"/>
+ <Char width="13" offset="0 4" rect="220 22 13 16" code="N"/>
+ <Char width="14" offset="0 4" rect="233 22 15 16" code="O"/>
+ <Char width="12" offset="0 4" rect="0 41 12 16" code="P"/>
+ <Char width="14" offset="0 4" rect="12 41 15 17" code="Q"/>
+ <Char width="12" offset="0 4" rect="27 41 13 16" code="R"/>
+ <Char width="12" offset="-1 4" rect="40 41 13 16" code="S"/>
+ <Char width="12" offset="0 4" rect="53 41 12 16" code="T"/>
+ <Char width="13" offset="0 4" rect="65 41 13 16" code="U"/>
+ <Char width="12" offset="-1 4" rect="78 41 14 16" code="V"/>
+ <Char width="18" offset="-1 4" rect="92 41 21 16" code="W"/>
+ <Char width="13" offset="-1 4" rect="113 41 15 16" code="X"/>
+ <Char width="11" offset="-1 4" rect="128 41 14 16" code="Y"/>
+ <Char width="12" offset="0 4" rect="142 41 12 16" code="Z"/>
+ <Char width="8" offset="1 4" rect="154 41 7 20" code="["/>
+ <Char width="8" offset="-1 4" rect="161 41 9 16" code="\"/>
+ <Char width="7" offset="-1 4" rect="170 41 8 20" code="]"/>
+ <Char width="14" offset="3 5" rect="178 42 8 11" code="^"/>
+ <Char width="12" offset="0 18" rect="186 55 12 5" code="_"/>
+ <Char width="7" offset="1 4" rect="198 41 6 5" code="`"/>
+ <Char width="10" offset="0 8" rect="204 45 10 12" code="a"/>
+ <Char width="11" offset="0 4" rect="214 41 11 16" code="b"/>
+ <Char width="10" offset="0 8" rect="225 45 11 12" code="c"/>
+ <Char width="11" offset="0 4" rect="236 41 11 16" code="d"/>
+ <Char width="11" offset="0 8" rect="0 65 11 12" code="e"/>
+ <Char width="8" offset="0 4" rect="11 61 9 16" code="f"/>
+ <Char width="11" offset="0 8" rect="20 65 11 16" code="g"/>
+ <Char width="10" offset="0 4" rect="31 61 10 16" code="h"/>
+ <Char width="5" offset="1 4" rect="41 61 4 16" code="i"/>
+ <Char width="6" offset="-2 4" rect="45 61 7 20" code="j"/>
+ <Char width="10" offset="0 4" rect="52 61 11 16" code="k"/>
+ <Char width="5" offset="1 4" rect="63 61 4 16" code="l"/>
+ <Char width="16" offset="0 8" rect="67 65 16 12" code="m"/>
+ <Char width="10" offset="0 8" rect="83 65 10 12" code="n"/>
+ <Char width="11" offset="0 8" rect="93 65 12 12" code="o"/>
+ <Char width="11" offset="0 8" rect="105 65 11 16" code="p"/>
+ <Char width="11" offset="0 8" rect="116 65 11 16" code="q"/>
+ <Char width="7" offset="0 7" rect="127 64 7 13" code="r"/>
+ <Char width="9" offset="-1 8" rect="134 65 11 12" code="s"/>
+ <Char width="8" offset="0 4" rect="145 61 8 16" code="t"/>
+ <Char width="10" offset="0 8" rect="153 65 10 12" code="u"/>
+ <Char width="10" offset="-1 8" rect="163 65 12 12" code="v"/>
+ <Char width="14" offset="-1 8" rect="175 65 16 12" code="w"/>
+ <Char width="10" offset="-1 8" rect="191 65 12 12" code="x"/>
+ <Char width="10" offset="-1 8" rect="203 65 12 16" code="y"/>
+ <Char width="9" offset="0 8" rect="215 65 9 12" code="z"/>
+ <Char width="8" offset="0 4" rect="224 61 8 20" code="{"/>
+ <Char width="7" offset="2 4" rect="232 61 4 21" code="|"/>
+ <Char width="9" offset="0 4" rect="236 61 8 20" code="}"/>
+ <Char width="11" offset="1 11" rect="244 68 10 6" code="~"/>
+ <Char width="12" offset="-1 0" rect="0 82 14 20" code="Ā"/>
+ <Char width="10" offset="0 4" rect="14 86 10 16" code="ā"/>
+ <Char width="13" offset="-1 1" rect="24 83 15 19" code="Ă"/>
+ <Char width="10" offset="0 4" rect="39 86 10 16" code="ă"/>
+ <Char width="13" offset="-1 4" rect="49 86 15 20" code="Ą"/>
+ <Char width="10" offset="0 8" rect="64 90 11 16" code="ą"/>
+ <Char width="14" offset="0 0" rect="75 82 15 20" code="Ć"/>
+ <Char width="10" offset="0 4" rect="90 86 11 16" code="ć"/>
+ <Char width="14" offset="0 0" rect="101 82 15 20" code="Ċ"/>
+ <Char width="10" offset="0 4" rect="116 86 11 16" code="ċ"/>
+ <Char width="14" offset="0 0" rect="127 82 15 20" code="Č"/>
+ <Char width="10" offset="0 4" rect="142 86 11 16" code="č"/>
+ <Char width="13" offset="0 0" rect="153 82 13 20" code="Ď"/>
+ <Char width="12" offset="0 4" rect="166 86 14 16" code="ď"/>
+ <Char width="14" offset="0 4" rect="180 86 15 16" code="Đ"/>
+ <Char width="12" offset="0 4" rect="195 86 13 16" code="đ"/>
+ <Char width="10" offset="0 0" rect="208 82 11 20" code="Ē"/>
+ <Char width="11" offset="0 4" rect="219 86 11 16" code="ē"/>
+ <Char width="11" offset="0 0" rect="230 82 11 20" code="Ė"/>
+ <Char width="11" offset="0 4" rect="241 86 11 16" code="ė"/>
+ <Char width="10" offset="0 4" rect="0 110 11 20" code="Ę"/>
+ <Char width="11" offset="0 8" rect="11 114 11 16" code="ę"/>
+ <Char width="11" offset="0 0" rect="22 106 11 20" code="Ě"/>
+ <Char width="11" offset="0 4" rect="33 110 11 16" code="ě"/>
+ <Char width="14" offset="0 0" rect="44 106 14 20" code="Ğ"/>
+ <Char width="11" offset="0 4" rect="58 110 11 20" code="ğ"/>
+ <Char width="14" offset="0 0" rect="69 106 14 20" code="Ġ"/>
+ <Char width="11" offset="0 4" rect="83 110 11 20" code="ġ"/>
+ <Char width="14" offset="0 4" rect="94 110 14 20" code="Ģ"/>
+ <Char width="11" offset="0 3" rect="108 109 11 21" code="ģ"/>
+ <Char width="14" offset="-1 4" rect="119 110 16 16" code="Ħ"/>
+ <Char width="10" offset="-2 4" rect="135 110 12 16" code="ħ"/>
+ <Char width="7" offset="-1 0" rect="147 106 9 20" code="Ĩ"/>
+ <Char width="5" offset="-2 4" rect="156 110 9 16" code="ĩ"/>
+ <Char width="6" offset="0 0" rect="165 106 6 20" code="Ī"/>
+ <Char width="6" offset="0 4" rect="171 110 6 16" code="ī"/>
+ <Char width="7" offset="0 4" rect="177 110 6 20" code="Į"/>
+ <Char width="5" offset="-1 4" rect="183 110 6 20" code="į"/>
+ <Char width="7" offset="2 0" rect="189 106 4 20" code="İ"/>
+ <Char width="5" offset="1 8" rect="193 114 4 12" code="ı"/>
+ <Char width="13" offset="1 4" rect="197 110 11 20" code="IJ"/>
+ <Char width="11" offset="1 4" rect="208 110 9 20" code="ij"/>
+ <Char width="13" offset="0 4" rect="217 110 14 21" code="Ķ"/>
+ <Char width="10" offset="0 4" rect="231 110 11 21" code="ķ"/>
+ <Char width="10" offset="0 0" rect="242 106 11 20" code="Ĺ"/>
+ <Char width="5" offset="1 0" rect="0 131 6 20" code="ĺ"/>
+ <Char width="11" offset="0 4" rect="6 135 11 21" code="Ļ"/>
+ <Char width="5" offset="0 4" rect="17 135 5 21" code="ļ"/>
+ <Char width="10" offset="0 4" rect="22 135 11 16" code="Ľ"/>
+ <Char width="6" offset="1 4" rect="33 135 7 16" code="ľ"/>
+ <Char width="10" offset="0 4" rect="40 135 11 16" code="Ŀ"/>
+ <Char width="6" offset="1 4" rect="51 135 7 16" code="ŀ"/>
+ <Char width="10" offset="-2 4" rect="58 135 13 16" code="Ł"/>
+ <Char width="6" offset="-1 4" rect="71 135 8 16" code="ł"/>
+ <Char width="13" offset="0 0" rect="79 131 13 20" code="Ń"/>
+ <Char width="10" offset="0 4" rect="92 135 10 16" code="ń"/>
+ <Char width="13" offset="0 4" rect="102 135 13 21" code="Ņ"/>
+ <Char width="10" offset="0 8" rect="115 139 10 17" code="ņ"/>
+ <Char width="13" offset="0 0" rect="125 131 13 20" code="Ň"/>
+ <Char width="10" offset="0 4" rect="138 135 10 16" code="ň"/>
+ <Char width="13" offset="0 4" rect="148 135 13 20" code="Ŋ"/>
+ <Char width="10" offset="0 8" rect="161 139 10 16" code="ŋ"/>
+ <Char width="14" offset="0 0" rect="171 131 15 20" code="Ō"/>
+ <Char width="11" offset="0 4" rect="186 135 12 16" code="ō"/>
+ <Char width="14" offset="0 0" rect="198 131 15 20" code="Ő"/>
+ <Char width="11" offset="0 4" rect="213 135 12 16" code="ő"/>
+ <Char width="17" offset="0 4" rect="225 135 18 16" code="Œ"/>
+ <Char width="18" offset="0 8" rect="0 165 19 12" code="œ"/>
+ <Char width="12" offset="0 0" rect="19 157 13 20" code="Ŕ"/>
+ <Char width="7" offset="0 4" rect="32 161 7 16" code="ŕ"/>
+ <Char width="12" offset="0 4" rect="39 161 13 21" code="Ŗ"/>
+ <Char width="7" offset="-1 7" rect="52 164 8 18" code="ŗ"/>
+ <Char width="12" offset="0 0" rect="60 157 13 20" code="Ř"/>
+ <Char width="7" offset="-1 4" rect="73 161 8 16" code="ř"/>
+ <Char width="12" offset="-1 0" rect="81 157 13 20" code="Ś"/>
+ <Char width="9" offset="-1 4" rect="94 161 11 16" code="ś"/>
+ <Char width="12" offset="-1 4" rect="105 161 13 20" code="Ş"/>
+ <Char width="9" offset="-1 8" rect="118 165 11 16" code="ş"/>
+ <Char width="12" offset="-1 0" rect="129 157 13 20" code="Š"/>
+ <Char width="9" offset="-1 4" rect="142 161 11 16" code="š"/>
+ <Char width="12" offset="0 4" rect="153 161 12 20" code="Ţ"/>
+ <Char width="8" offset="0 4" rect="165 161 8 20" code="ţ"/>
+ <Char width="12" offset="0 0" rect="173 157 12 20" code="Ť"/>
+ <Char width="8" offset="0 4" rect="185 161 10 16" code="ť"/>
+ <Char width="12" offset="0 0" rect="195 157 12 20" code="Ŧ"/>
+ <Char width="8" offset="0 4" rect="207 161 8 16" code="ŧ"/>
+ <Char width="13" offset="0 -1" rect="215 156 13 21" code="Ũ"/>
+ <Char width="10" offset="0 4" rect="228 161 10 16" code="ũ"/>
+ <Char width="13" offset="0 0" rect="238 157 13 20" code="Ū"/>
+ <Char width="10" offset="0 4" rect="0 187 10 16" code="ū"/>
+ <Char width="13" offset="0 -1" rect="10 182 13 21" code="Ů"/>
+ <Char width="10" offset="0 4" rect="23 187 10 16" code="ů"/>
+ <Char width="13" offset="0 0" rect="33 183 13 20" code="Ű"/>
+ <Char width="10" offset="0 4" rect="46 187 11 16" code="ű"/>
+ <Char width="14" offset="0 4" rect="57 187 14 20" code="Ų"/>
+ <Char width="10" offset="0 8" rect="71 191 11 16" code="ų"/>
+ <Char width="18" offset="-1 -1" rect="82 182 21 21" code="Ŵ"/>
+ <Char width="14" offset="-1 4" rect="103 187 16 16" code="ŵ"/>
+ <Char width="11" offset="-1 -1" rect="119 182 14 21" code="Ŷ"/>
+ <Char width="10" offset="-1 4" rect="133 187 12 20" code="ŷ"/>
+ <Char width="11" offset="0 0" rect="145 183 13 20" code="Ÿ"/>
+ <Char width="12" offset="0 0" rect="158 183 12 20" code="Ź"/>
+ <Char width="9" offset="0 4" rect="170 187 9 16" code="ź"/>
+ <Char width="12" offset="0 0" rect="179 183 12 20" code="Ż"/>
+ <Char width="9" offset="0 4" rect="191 187 9 16" code="ż"/>
+ <Char width="12" offset="0 0" rect="200 183 12 20" code="Ž"/>
+ <Char width="9" offset="0 4" rect="212 187 9 16" code="ž"/>
+</Font>

BIN
samples/res/gravityFont.png