Skip to content
Snippets Groups Projects
Commit 4124854b authored by Hartmut Henkel's avatar Hartmut Henkel
Browse files

new function pack_height_depth() for multidirectional packaging

(not used yet) + fontdir.fig update
parent 71cdb0da
Branches
Tags
No related merge requests found
......@@ -19,12 +19,6 @@ Single
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
1800 2250 1800 2070 2250 2070 2250 2250
-6
6 4905 900 5445 1575
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
4950 1350 4950 945 5400 945 5400 1350
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
4950 1350 4950 1530 5400 1530 5400 1350
-6
6 4905 2025 5445 2700
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
4950 2250 4950 2655 5400 2655 5400 2250
......@@ -55,19 +49,59 @@ Single
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
4275 4815 4095 4815 4095 5265 4275 5265
-6
6 6885 1980 10665 2520
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 6975 2250 40 40 6975 2250 7015 2250
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 10575 2250 40 40 10575 2250 10615 2250
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
6975 2250 8550 2250
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
10575 2250 9000 2250
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
7560 2025 6975 2025 6975 2475 7560 2475 7560 2025
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
10575 2025 9990 2025 9990 2475 10575 2475 10575 2025
6 10530 1080 11205 1620
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
10755 1575 11160 1575 11160 1125 10755 1125
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
10755 1575 10575 1575 10575 1125 10755 1125
-6
6 6345 1080 7020 1620
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
6795 1575 6390 1575 6390 1125 6795 1125
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
6795 1575 6975 1575 6975 1125 6795 1125
-6
6 6930 1980 7605 2520
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
7155 2475 7560 2475 7560 2025 7155 2025
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
7155 2475 6975 2475 6975 2025 7155 2025
-6
6 9945 1980 10620 2520
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
10395 2475 9990 2475 9990 2025 10395 2025
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
10395 2475 10575 2475 10575 2025 10395 2025
-6
6 6705 3060 7245 3735
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
6750 3510 6750 3105 7200 3105 7200 3510
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
6750 3510 6750 3690 7200 3690 7200 3510
-6
6 9180 4635 9720 5310
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
9225 5085 9225 4680 9675 4680 9675 5085
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
9225 5085 9225 5265 9675 5265 9675 5085
-6
6 7830 3645 8370 4320
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
7875 3870 7875 4275 8325 4275 8325 3870
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
7875 3870 7875 3690 8325 3690 8325 3870
-6
6 10305 4635 10845 5310
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
10350 4860 10350 5265 10800 5265 10800 4860
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
10350 4860 10350 4680 10800 4680 10800 4860
-6
6 4905 900 5445 1575
2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 4
4950 1350 4950 945 5400 945 5400 1350
2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 4
4950 1350 4950 1530 5400 1530 5400 1350
-6
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 1800 1350 40 40 1800 1350 1840 1350
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 1800 2250 40 40 1800 2250 1840 2250
......@@ -83,6 +117,8 @@ Single
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 9450 5265 40 40 9450 5265 9490 5265
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 6975 1350 40 40 6975 1350 7015 1350
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 10575 1350 40 40 10575 1350 10615 1350
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 6975 2250 40 40 6975 2250 7015 2250
1 3 0 2 0 -1 49 -1 20 0.000 1 0.0000 10575 2250 40 40 10575 2250 10615 2250
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
1800 1350 3375 1350
......@@ -110,20 +146,12 @@ Single
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
8100 3690 8100 5265
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
7875 3690 7875 4275 8325 4275 8325 3690 7875 3690
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
6975 3690 6975 5265
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6750 3105 6750 3690 7200 3690 7200 3105 6750 3105
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
10575 5265 10575 3690
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
10350 5265 10350 5850 10800 5850 10800 5265 10350 5265
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
9225 4680 9225 5265 9675 5265 9675 4680 9225 4680
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
9450 5265 9450 3690
......@@ -133,24 +161,26 @@ Single
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
10575 1350 9000 1350
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
6975 1125 6390 1125 6390 1575 6975 1575 6975 1125
2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
11160 1125 10575 1125 10575 1575 11160 1575 11160 1125
4 0 0 50 -1 0 5 0.0000 4 75 390 1395 5850 fontdir.fig\001
4 0 0 50 -1 0 14 0.0000 4 165 330 5535 2295 RB\001
4 1 0 50 -1 0 14 0.0000 4 165 330 4275 3555 BR\001
4 1 0 50 -1 0 14 0.0000 4 165 300 1800 3555 TL\001
4 1 0 50 -1 0 14 0.0000 4 165 315 2925 3555 BL\001
4 1 0 50 -1 0 14 0.0000 4 165 315 5400 3555 TR\001
4 2 0 50 -1 0 14 0.0000 4 165 300 1665 1395 LT\001
4 2 0 50 -1 0 14 0.0000 4 165 315 1665 2295 LB\001
4 0 0 50 -1 0 14 0.0000 4 165 315 5535 1395 RT\001
4 1 0 50 -1 0 14 0.0000 4 165 315 8100 3555 TB\001
4 1 0 50 -1 0 14 0.0000 4 165 315 9450 3555 BT\001
4 1 0 50 -1 0 14 0.0000 4 165 330 10575 3555 BB\001
4 1 0 50 -1 0 14 0.0000 4 165 300 6975 3555 TT\001
4 2 0 50 -1 0 14 0.0000 4 165 315 6840 2295 LR\001
4 2 0 50 -1 0 14 0.0000 4 165 300 6840 1395 LL\001
4 0 0 50 -1 0 14 0.0000 4 165 330 10710 1395 RR\001
4 0 0 50 -1 0 14 0.0000 4 165 315 10710 2295 RL\001
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
6975 2250 8550 2250
2 1 0 2 0 7 55 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 90.00 180.00
10575 2250 9000 2250
4 2 0 50 -1 0 14 0.0000 4 165 420 1665 1395 *LT\001
4 2 0 50 -1 0 14 0.0000 4 165 435 1665 2295 *LB\001
4 0 0 50 -1 0 14 0.0000 4 165 435 5535 1395 *RT\001
4 0 0 50 -1 0 14 0.0000 4 165 450 5535 2295 *RB\001
4 0 0 50 -1 0 14 0.0000 4 165 450 10710 1395 *RR\001
4 0 0 50 -1 0 14 0.0000 4 165 435 10710 2295 *RL\001
4 1 0 50 -1 0 14 0.0000 4 165 420 1800 3555 *TL\001
4 1 0 50 -1 0 14 0.0000 4 165 435 2925 3555 *BL\001
4 1 0 50 -1 0 14 0.0000 4 165 450 4275 3555 *BR\001
4 1 0 50 -1 0 14 0.0000 4 165 435 5400 3555 *TR\001
4 1 0 50 -1 0 14 0.0000 4 165 420 6975 3555 *TT\001
4 1 0 50 -1 0 14 0.0000 4 165 435 8100 3555 *TB\001
4 1 0 50 -1 0 14 0.0000 4 165 435 9450 3555 *BT\001
4 1 0 50 -1 0 14 0.0000 4 165 450 10575 3555 *BB\001
4 2 0 50 -1 0 14 0.0000 4 165 435 6840 2295 *LR\001
4 2 0 50 -1 0 14 0.0000 4 165 420 6840 1395 *LL\001
4 0 0 50 -1 0 4 0.0000 4 75 390 1350 5310 fontdir.fig\001
No preview for this file type
/* directions.c
Copyright 2009 Taco Hoekwater <taco@luatex.org>
This file is part of LuaTeX.
......@@ -24,7 +24,7 @@ static const char __svn_version[] =
"$Id$"
"$URL$";
/* |scan_direction| has to be defined here because luatangle will output
/* |scan_direction| has to be defined here because luatangle will output
a character constant when it sees a string literal of length 1 */
#define scan_single_dir(A) do { \
......@@ -167,3 +167,57 @@ scaled pack_width(int curdir, int pdir, halfword p, boolean isglyph)
}
return wd;
}
scaled_whd pack_height_depth(int curdir, int pdir, halfword p, boolean isglyph)
{
scaled_whd whd = { 0, 0, 0 };
if (isglyph) {
if (is_rotated(curdir)) {
if (dir_parallel(dir_secondary[curdir], dir_secondary[pdir]))
whd.ht = whd.dp = (glyph_height(p) + glyph_depth(p)) / 2;
else
whd.ht = whd.dp = glyph_width(p) / 2;
} else {
if (is_rotated(pdir)) {
if (dir_parallel(dir_secondary[curdir], dir_secondary[pdir]))
whd.ht = whd.dp = (glyph_height(p) + glyph_depth(p)) / 2;
else {
whd.ht = glyph_width(p);
whd.dp = 0;
}
} else {
if (dir_eq(dir_tertiary[curdir], dir_tertiary[pdir])) {
whd.ht = glyph_height(p);
whd.dp = glyph_depth(p);
} else
if (dir_opposite(dir_tertiary[curdir], dir_tertiary[pdir]))
{
whd.ht = glyph_depth(p);
whd.dp = glyph_height(p);
} else {
whd.ht = glyph_width(p);
whd.dp = 0;
}
}
}
} else {
if (is_rotated(curdir)) {
if (dir_parallel(dir_secondary[curdir], dir_secondary[pdir]))
whd.ht = whd.dp = (height(p) + depth(p)) / 2;
else
whd.ht = whd.dp = width(p) / 2;
} else {
if (dir_eq(dir_primary[curdir], dir_primary[pdir])) {
whd.ht = height(p);
whd.dp = depth(p);
} else if (dir_opposite(dir_primary[curdir], dir_primary[pdir])) {
whd.ht = depth(p);
whd.dp = height(p);
} else {
whd.ht = width(p);
whd.dp = 0;
}
}
}
return whd;
}
......@@ -57,13 +57,13 @@
# define dir_TLT 0
# define glyph_dir dir_TLT
# define box_direction(A) ((A) / 4)
# define font_direction(A) ((A) % 16)
# define dir_eq(A,B) ((A)==(B))
# define dir_opposite(A,B) ((((A)+2) % 4)==((B) % 4))
# define box_direction(a) ((a) / 4)
# define font_direction(a) ((a) % 16)
# define dir_eq(a,b) ((a)==(b))
# define dir_opposite(a,b) ((((a)+2) % 4)==((b) % 4))
# define dir_parallel(a,b) (((a) % 2)==((b) % 2))
# define dir_orthogonal(a,b) (!dir_parallel((a),(b)))
# define is_mirrored(A) (dir_opposite(dir_primary[(A)],dir_tertiary[(A)]))
# define is_mirrored(a) (dir_opposite(dir_primary[(a)],dir_tertiary[(a)]))
# define is_rotated(a) dir_parallel(dir_secondary[(a)],dir_tertiary[(a)])
# define line_horizontal(a) dir_parallel(dir_secondary[(a)],dir_secondary[dir_TLT])
# define line_vertical(a) (!line_horizontal(a))
......@@ -106,5 +106,6 @@ extern halfword do_push_dir_node(halfword p, halfword a);
extern halfword do_pop_dir_node(halfword p);
scaled pack_width(int curdir, int pdir, halfword p, boolean isglyph);
scaled_whd pack_height_depth(int curdir, int pdir, halfword p, boolean isglyph);
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment