Update font constants

This commit is contained in:
Christopher Chedeau
2015-02-04 07:57:13 -08:00
parent 5f8c3b0eb7
commit 0e56641b28
6 changed files with 56 additions and 56 deletions

View File

@@ -12,9 +12,9 @@
/** START_GENERATED **/
#define SMALL_WIDTH 34.671875
#define SMALL_HEIGHT 18
#define SMALL_HEIGHT 16
#define BIG_WIDTH 172.421875
#define BIG_HEIGHT 36
#define BIG_HEIGHT 32
#define BIG_MIN_WIDTH 100.453125
#define SMALL_TEXT "small"
#define LONG_TEXT "loooooooooong with space"

View File

@@ -358,9 +358,9 @@ var layoutTestUtils = (function() {
var preDefinedTextSizes = {
smallWidth: 34.671875,
smallHeight: 18,
smallHeight: 16,
bigWidth: 172.421875,
bigHeight: 36,
bigHeight: 32,
bigMinWidth: 100.453125
};

View File

@@ -2483,7 +2483,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 34.671875;
node_0->layout.dimensions[CSS_HEIGHT] = 18;
node_0->layout.dimensions[CSS_HEIGHT] = 16;
}
test("should layout node with just text", root_node, root_layout);
@@ -2504,7 +2504,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 10;
node_0->layout.dimensions[CSS_HEIGHT] = 18;
node_0->layout.dimensions[CSS_HEIGHT] = 16;
}
test("should layout node with text and width", root_node, root_layout);
@@ -2524,7 +2524,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 172.421875;
node_0->layout.dimensions[CSS_HEIGHT] = 18;
node_0->layout.dimensions[CSS_HEIGHT] = 16;
}
test("should layout node with text, padding and margin", root_node, root_layout);
@@ -2606,7 +2606,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 500;
node_0->layout.dimensions[CSS_HEIGHT] = 18;
node_0->layout.dimensions[CSS_HEIGHT] = 16;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2614,7 +2614,7 @@ int main()
node_1->layout.position[CSS_TOP] = 0;
node_1->layout.position[CSS_LEFT] = 0;
node_1->layout.dimensions[CSS_WIDTH] = 500;
node_1->layout.dimensions[CSS_HEIGHT] = 18;
node_1->layout.dimensions[CSS_HEIGHT] = 16;
init_css_node_children(node_1, 1);
{
css_node_t *node_2;
@@ -2622,7 +2622,7 @@ int main()
node_2->layout.position[CSS_TOP] = 0;
node_2->layout.position[CSS_LEFT] = 0;
node_2->layout.dimensions[CSS_WIDTH] = 500;
node_2->layout.dimensions[CSS_HEIGHT] = 18;
node_2->layout.dimensions[CSS_HEIGHT] = 16;
}
}
}
@@ -2657,7 +2657,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 130;
node_0->layout.dimensions[CSS_HEIGHT] = 36;
node_0->layout.dimensions[CSS_HEIGHT] = 32;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2665,7 +2665,7 @@ int main()
node_1->layout.position[CSS_TOP] = 0;
node_1->layout.position[CSS_LEFT] = 0;
node_1->layout.dimensions[CSS_WIDTH] = 130;
node_1->layout.dimensions[CSS_HEIGHT] = 36;
node_1->layout.dimensions[CSS_HEIGHT] = 32;
init_css_node_children(node_1, 1);
{
css_node_t *node_2;
@@ -2673,7 +2673,7 @@ int main()
node_2->layout.position[CSS_TOP] = 0;
node_2->layout.position[CSS_LEFT] = 0;
node_2->layout.dimensions[CSS_WIDTH] = 130;
node_2->layout.dimensions[CSS_HEIGHT] = 36;
node_2->layout.dimensions[CSS_HEIGHT] = 32;
}
}
}
@@ -2709,7 +2709,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 200;
node_0->layout.dimensions[CSS_HEIGHT] = 36;
node_0->layout.dimensions[CSS_HEIGHT] = 32;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2717,7 +2717,7 @@ int main()
node_1->layout.position[CSS_TOP] = 0;
node_1->layout.position[CSS_LEFT] = 0;
node_1->layout.dimensions[CSS_WIDTH] = 200;
node_1->layout.dimensions[CSS_HEIGHT] = 36;
node_1->layout.dimensions[CSS_HEIGHT] = 32;
init_css_node_children(node_1, 1);
{
css_node_t *node_2;
@@ -2725,7 +2725,7 @@ int main()
node_2->layout.position[CSS_TOP] = 0;
node_2->layout.position[CSS_LEFT] = 0;
node_2->layout.dimensions[CSS_WIDTH] = 130;
node_2->layout.dimensions[CSS_HEIGHT] = 36;
node_2->layout.dimensions[CSS_HEIGHT] = 32;
}
}
}
@@ -2755,7 +2755,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 100;
node_0->layout.dimensions[CSS_HEIGHT] = 36;
node_0->layout.dimensions[CSS_HEIGHT] = 32;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2763,7 +2763,7 @@ int main()
node_1->layout.position[CSS_TOP] = 0;
node_1->layout.position[CSS_LEFT] = 0;
node_1->layout.dimensions[CSS_WIDTH] = 100.453125;
node_1->layout.dimensions[CSS_HEIGHT] = 36;
node_1->layout.dimensions[CSS_HEIGHT] = 32;
}
}
@@ -2805,7 +2805,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 100;
node_0->layout.dimensions[CSS_HEIGHT] = 76;
node_0->layout.dimensions[CSS_HEIGHT] = 72;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2813,7 +2813,7 @@ int main()
node_1->layout.position[CSS_TOP] = 20;
node_1->layout.position[CSS_LEFT] = 20;
node_1->layout.dimensions[CSS_WIDTH] = 100.453125;
node_1->layout.dimensions[CSS_HEIGHT] = 36;
node_1->layout.dimensions[CSS_HEIGHT] = 32;
init_css_node_children(node_1, 1);
{
css_node_t *node_2;
@@ -2821,7 +2821,7 @@ int main()
node_2->layout.position[CSS_TOP] = 0;
node_2->layout.position[CSS_LEFT] = 0;
node_2->layout.dimensions[CSS_WIDTH] = 100.453125;
node_2->layout.dimensions[CSS_HEIGHT] = 36;
node_2->layout.dimensions[CSS_HEIGHT] = 32;
}
}
}
@@ -2936,7 +2936,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 200;
node_0->layout.dimensions[CSS_HEIGHT] = 58;
node_0->layout.dimensions[CSS_HEIGHT] = 56;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2944,7 +2944,7 @@ int main()
node_1->layout.position[CSS_TOP] = 0;
node_1->layout.position[CSS_LEFT] = 0;
node_1->layout.dimensions[CSS_WIDTH] = 200;
node_1->layout.dimensions[CSS_HEIGHT] = 58;
node_1->layout.dimensions[CSS_HEIGHT] = 56;
init_css_node_children(node_1, 1);
{
css_node_t *node_2;
@@ -2952,7 +2952,7 @@ int main()
node_2->layout.position[CSS_TOP] = 20;
node_2->layout.position[CSS_LEFT] = 20;
node_2->layout.dimensions[CSS_WIDTH] = 172.421875;
node_2->layout.dimensions[CSS_HEIGHT] = 18;
node_2->layout.dimensions[CSS_HEIGHT] = 16;
}
}
}
@@ -2989,7 +2989,7 @@ int main()
node_0->layout.position[CSS_TOP] = 0;
node_0->layout.position[CSS_LEFT] = 0;
node_0->layout.dimensions[CSS_WIDTH] = 200;
node_0->layout.dimensions[CSS_HEIGHT] = 76;
node_0->layout.dimensions[CSS_HEIGHT] = 72;
init_css_node_children(node_0, 1);
{
css_node_t *node_1;
@@ -2997,7 +2997,7 @@ int main()
node_1->layout.position[CSS_TOP] = 0;
node_1->layout.position[CSS_LEFT] = 0;
node_1->layout.dimensions[CSS_WIDTH] = 200;
node_1->layout.dimensions[CSS_HEIGHT] = 76;
node_1->layout.dimensions[CSS_HEIGHT] = 72;
init_css_node_children(node_1, 1);
{
css_node_t *node_2;
@@ -3005,7 +3005,7 @@ int main()
node_2->layout.position[CSS_TOP] = 20;
node_2->layout.position[CSS_LEFT] = 20;
node_2->layout.dimensions[CSS_WIDTH] = 160;
node_2->layout.dimensions[CSS_HEIGHT] = 36;
node_2->layout.dimensions[CSS_HEIGHT] = 32;
}
}
}

View File

@@ -890,8 +890,8 @@ describe('Layout', function() {
{style: {margin: 20, measure: text(texts.big)}}
]}
]},
{width: 200, height: 58, top: 0, left: 0, children: [
{width: 200, height: 58, top: 0, left: 0, children: [
{width: 200, height: textSizes.smallHeight + 40, top: 0, left: 0, children: [
{width: 200, height: textSizes.smallHeight + 40, top: 0, left: 0, children: [
{width: textSizes.bigWidth, height: textSizes.smallHeight, top: 20, left: 20}
]}
]}
@@ -905,8 +905,8 @@ describe('Layout', function() {
{style: {margin: 20, measure: text(texts.big)}}
]}
]},
{width: 200, height: 76, top: 0, left: 0, children: [
{width: 200, height: 76, top: 0, left: 0, children: [
{width: 200, height: textSizes.bigHeight + 40, top: 0, left: 0, children: [
{width: 200, height: textSizes.bigHeight + 40, top: 0, left: 0, children: [
{width: 160, height: textSizes.bigHeight, top: 20, left: 20}
]}
]}

View File

@@ -2685,7 +2685,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 34.671875f;
node_0.layout.height = 18;
node_0.layout.height = 16;
}
test("should layout node with just text", root_node, root_layout);
@@ -2708,7 +2708,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 10;
node_0.layout.height = 18;
node_0.layout.height = 16;
}
test("should layout node with text and width", root_node, root_layout);
@@ -2730,7 +2730,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 172.421875f;
node_0.layout.height = 18;
node_0.layout.height = 16;
}
test("should layout node with text, padding and margin", root_node, root_layout);
@@ -2816,7 +2816,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 500;
node_0.layout.height = 18;
node_0.layout.height = 16;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -2824,7 +2824,7 @@ public class LayoutEngineTest {
node_1.layout.y = 0;
node_1.layout.x = 0;
node_1.layout.width = 500;
node_1.layout.height = 18;
node_1.layout.height = 16;
addChildren(node_1, 1);
{
TestCSSNode node_2;
@@ -2832,7 +2832,7 @@ public class LayoutEngineTest {
node_2.layout.y = 0;
node_2.layout.x = 0;
node_2.layout.width = 500;
node_2.layout.height = 18;
node_2.layout.height = 16;
}
}
}
@@ -2869,7 +2869,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 130;
node_0.layout.height = 36;
node_0.layout.height = 32;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -2877,7 +2877,7 @@ public class LayoutEngineTest {
node_1.layout.y = 0;
node_1.layout.x = 0;
node_1.layout.width = 130;
node_1.layout.height = 36;
node_1.layout.height = 32;
addChildren(node_1, 1);
{
TestCSSNode node_2;
@@ -2885,7 +2885,7 @@ public class LayoutEngineTest {
node_2.layout.y = 0;
node_2.layout.x = 0;
node_2.layout.width = 130;
node_2.layout.height = 36;
node_2.layout.height = 32;
}
}
}
@@ -2923,7 +2923,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 200;
node_0.layout.height = 36;
node_0.layout.height = 32;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -2931,7 +2931,7 @@ public class LayoutEngineTest {
node_1.layout.y = 0;
node_1.layout.x = 0;
node_1.layout.width = 200;
node_1.layout.height = 36;
node_1.layout.height = 32;
addChildren(node_1, 1);
{
TestCSSNode node_2;
@@ -2939,7 +2939,7 @@ public class LayoutEngineTest {
node_2.layout.y = 0;
node_2.layout.x = 0;
node_2.layout.width = 130;
node_2.layout.height = 36;
node_2.layout.height = 32;
}
}
}
@@ -2971,7 +2971,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 100;
node_0.layout.height = 36;
node_0.layout.height = 32;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -2979,7 +2979,7 @@ public class LayoutEngineTest {
node_1.layout.y = 0;
node_1.layout.x = 0;
node_1.layout.width = 100.453125f;
node_1.layout.height = 36;
node_1.layout.height = 32;
}
}
@@ -3023,7 +3023,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 100;
node_0.layout.height = 76;
node_0.layout.height = 72;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -3031,7 +3031,7 @@ public class LayoutEngineTest {
node_1.layout.y = 20;
node_1.layout.x = 20;
node_1.layout.width = 100.453125f;
node_1.layout.height = 36;
node_1.layout.height = 32;
addChildren(node_1, 1);
{
TestCSSNode node_2;
@@ -3039,7 +3039,7 @@ public class LayoutEngineTest {
node_2.layout.y = 0;
node_2.layout.x = 0;
node_2.layout.width = 100.453125f;
node_2.layout.height = 36;
node_2.layout.height = 32;
}
}
}
@@ -3160,7 +3160,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 200;
node_0.layout.height = 58;
node_0.layout.height = 56;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -3168,7 +3168,7 @@ public class LayoutEngineTest {
node_1.layout.y = 0;
node_1.layout.x = 0;
node_1.layout.width = 200;
node_1.layout.height = 58;
node_1.layout.height = 56;
addChildren(node_1, 1);
{
TestCSSNode node_2;
@@ -3176,7 +3176,7 @@ public class LayoutEngineTest {
node_2.layout.y = 20;
node_2.layout.x = 20;
node_2.layout.width = 172.421875f;
node_2.layout.height = 18;
node_2.layout.height = 16;
}
}
}
@@ -3215,7 +3215,7 @@ public class LayoutEngineTest {
node_0.layout.y = 0;
node_0.layout.x = 0;
node_0.layout.width = 200;
node_0.layout.height = 76;
node_0.layout.height = 72;
addChildren(node_0, 1);
{
TestCSSNode node_1;
@@ -3223,7 +3223,7 @@ public class LayoutEngineTest {
node_1.layout.y = 0;
node_1.layout.x = 0;
node_1.layout.width = 200;
node_1.layout.height = 76;
node_1.layout.height = 72;
addChildren(node_1, 1);
{
TestCSSNode node_2;
@@ -3231,7 +3231,7 @@ public class LayoutEngineTest {
node_2.layout.y = 20;
node_2.layout.x = 20;
node_2.layout.width = 160;
node_2.layout.height = 36;
node_2.layout.height = 32;
}
}
}

View File

@@ -15,9 +15,9 @@ public class TestConstants {
/** START_GENERATED **/
public static final float SMALL_WIDTH = 34.671875f;
public static final float SMALL_HEIGHT = 18f;
public static final float SMALL_HEIGHT = 16f;
public static final float BIG_WIDTH = 172.421875f;
public static final float BIG_HEIGHT = 36f;
public static final float BIG_HEIGHT = 32f;
public static final float BIG_MIN_WIDTH = 100.453125f;
public static final String SMALL_TEXT = "small";
public static final String LONG_TEXT = "loooooooooong with space";