freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] ttfautohint 0.4 has been released


From: Werner LEMBERG
Subject: Re: [ft-devel] ttfautohint 0.4 has been released
Date: Sun, 30 Oct 2011 10:36:20 +0100 (CET)

> I'll send you a patch which uses elements from the cvt only.

Here it is.  Please apply it to the current git.


    Werner
diff --git a/src/tabytecode.h b/src/tabytecode.h
index 8a50cab..2eea217 100644
--- a/src/tabytecode.h
+++ b/src/tabytecode.h
@@ -306,9 +306,7 @@
 #define sal_func sal_limit +1
 #define sal_num_segments sal_func + 1
 #define sal_scale sal_num_segments + 1
-#define sal_0x10000 sal_scale + 1
-#define sal_is_extra_light sal_0x10000 + 1
-#define sal_anchor sal_is_extra_light + 1
+#define sal_anchor sal_scale + 1
 #define sal_point_min sal_anchor + 1
 #define sal_point_max sal_point_min + 1
 #define sal_segment_offset sal_point_max + 1 /* must be last */
@@ -382,8 +380,10 @@
 /* symbolic names for CVT locations */
 
 #define cvtl_temp 0 /* used for creating twilight points */
-#define cvtl_scale cvtl_temp + 1 /* assigned in the `prep' table */
-#define cvtl_max_runtime cvtl_scale + 1 /* must be last */
+#define cvtl_0x10000 cvtl_temp + 1 /* assigned in the `prep' table */
+#define cvtl_scale cvtl_0x10000 + 1 /* assigned in the `prep' table */
+#define cvtl_is_extra_light cvtl_scale + 1 /* assigned in the `prep' table */
+#define cvtl_max_runtime cvtl_is_extra_light + 1 /* must be last */
 
 /* the horizontal and vertical standard widths */
 #define CVT_HORZ_STANDARD_WIDTH_OFFSET(font) cvtl_max_runtime
diff --git a/src/tafpgm.c b/src/tafpgm.c
index 681e727..d4b5025 100644
--- a/src/tafpgm.c
+++ b/src/tafpgm.c
@@ -140,8 +140,8 @@ unsigned char FPGM(bci_round) [] = {
  *     stem_is_serif
  *     base_is_round
  * out: new_width
- * sal: sal_is_extra_light
- * CVT: std_width
+ * CVT: cvtl_is_extra_light
+ *      std_width
  */
 
 unsigned char FPGM(bci_compute_stem_width_a) [] = {
@@ -164,8 +164,8 @@ unsigned char FPGM(bci_compute_stem_width_a) [] = {
   AND, /* stem_is_serif && dist < 3*64 */
 
   PUSHB_1,
-    sal_is_extra_light,
-  RS,
+    cvtl_is_extra_light,
+  RCVT,
   OR, /* (stem_is_serif && dist < 3*64) || is_extra_light */
 
   IF, /* s: base_is_round width dist */
@@ -397,8 +397,8 @@ unsigned char FPGM(bci_cvt_rescale) [] = {
   RS,
   MUL, /* CVT * scale * 2^10 */
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV, /* CVT * scale */
 
   WCVTP,
@@ -716,8 +716,8 @@ unsigned char FPGM(bci_create_segment) [] = {
   RS,
   MUL, /* middle_pos * scale * 2^10 */
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV, /* middle_pos = middle_pos * scale */
 
   /* write it to temporary CVT location */
@@ -949,8 +949,8 @@ unsigned char FPGM(bci_scale_contour) [] = {
   RS,
   MUL, /* min_pos * scale * 2^10 */
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV, /* min_pos_new = min_pos * scale */
   SWAP,
   SUB,
@@ -970,8 +970,8 @@ unsigned char FPGM(bci_scale_contour) [] = {
     RS,
     MUL, /* max_pos * scale * 2^10 */
     PUSHB_1,
-      sal_0x10000,
-    RS,
+      cvtl_0x10000,
+    RCVT,
     DIV, /* max_pos_new = max_pos * scale */
     SWAP,
     SUB,
@@ -1106,8 +1106,8 @@ unsigned char FPGM(bci_shift_subglyph) [] = {
   RCVT, /* scaling factor FUnits -> pixels */
   MUL,
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV,
 
   /* the autohinter always rounds offsets */
@@ -1119,13 +1119,13 @@ unsigned char FPGM(bci_shift_subglyph) [] = {
     sal_scale,
   RS,
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   SUB, /* scale - 1 (in 16.16 format) */
   MUL,
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV, /* delta = offset * (scale - 1) */
 
   /* and round again */
@@ -1192,8 +1192,8 @@ unsigned char FPGM(bci_ip_outer_align_point) [] = {
   RS,
   MUL, /* point_orig_pos * scale * 2^10 */
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV, /* point_orig_pos = point_orig_pos * scale */
 
   PUSHB_1,
@@ -1266,8 +1266,8 @@ unsigned char FPGM(bci_ip_between_align_point) [] = {
   RS,
   MUL, /* point_orig_pos * scale * 2^10 */
   PUSHB_1,
-    sal_0x10000,
-  RS,
+    cvtl_0x10000,
+  RCVT,
   DIV, /* point_orig_pos = point_orig_pos * scale */
 
   PUSHB_1,
diff --git a/src/taprep.c b/src/taprep.c
index a2e161f..f5eef1a 100644
--- a/src/taprep.c
+++ b/src/taprep.c
@@ -19,9 +19,9 @@
 #define PREP(snippet_name) prep_ ## snippet_name
 
 /* we often need 0x10000 which can't be pushed directly onto the stack, */
-/* thus we provide it in the storage area; */
+/* thus we provide it in the CVS as `cvtl_0x10000'; */
 /* at the same time, we store it in CVT index `cvtl_scale' also */
-/* to get a scaling value from FUnits to pixels */
+/* as a scaled value to have a conversion factor from FUnits to pixels */
 
 unsigned char PREP(store_0x10000) [] = {
 
@@ -34,9 +34,9 @@ unsigned char PREP(store_0x10000) [] = {
 
   DUP,
   PUSHB_1,
-    sal_0x10000,
+    cvtl_0x10000,
   SWAP,
-  WS,
+  WCVTP,
 
   DUP,
   PUSHB_1,
@@ -70,8 +70,8 @@ unsigned char PREP(align_top_b) [] = {
   NEQ,
   IF, /* s: scaled fitted */
     PUSHB_1,
-      sal_0x10000,
-    RS,
+      cvtl_0x10000,
+    RCVT,
     MUL, /* scaled in 16.16 format */
     SWAP,
     DIV, /* (fitted / scaled) in 16.16 format */
@@ -130,8 +130,8 @@ unsigned char PREP(loop_cvt_d) [] = {
   ELSE,
     PUSHB_2,
       sal_scale,
-      sal_0x10000,
-    RS,
+      cvtl_0x10000,
+    RCVT,
     WS,
   EIF,
 
@@ -141,7 +141,7 @@ unsigned char PREP(compute_extra_light_a) [] = {
 
   /* compute (vertical) `extra_light' flag */
   PUSHB_3,
-    sal_is_extra_light,
+    cvtl_is_extra_light,
     40,
 
 };
@@ -152,7 +152,7 @@ unsigned char PREP(compute_extra_light_b) [] = {
 
   RCVT,
   GT, /* standard_width < 40 */
-  WS,
+  WCVTP,
 
 };
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]