ref: 724f34cd1635f96b5ae4a2d98addfd5b96c6b085
parent: 0edbea43ea0446eab1ec4535d17b5b13a01d5910
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Apr 19 13:04:41 EDT 2021
add type4 function ops
--- a/op.c
+++ b/op.c
@@ -126,4 +126,52 @@
/* 9.6.4 Type 3 font operators */
{"d0", t3width, 2,}, /* width info */ {"d1", t3widthbb, 6,}, /* width & bounding box */+
+ /* 7.10.5.2 Operators and operands */
+ /* B.2 Arithmetic operators */
+ {"add", t4add, 2,},+ {"sub", t4sub, 2,},+ {"mul", t4mul, 2,},+ {"div", t4div, 2,},+ {"idiv", t4idiv, 2,},+ {"mod", t4mod, 2,},+ {"neg", t4neg, 1,},+ {"abs", t4abs, 1,},+ {"ceiling", t4ceiling, 1,},+ {"floor, t4floor, 1,},+ {"round", t4round, 1,},+ {"truncate", t4truncate, 1,},+ {"sqrt", t4sqrt, 1,},+ {"sin", t4sin, 1,},+ {"cos", t4cos, 1,},+ {"atan", t4atan, 2,},+ {"exp", t4exp, 2,},+ {"ln", t4ln, 1,},+ {"log", t4log, 1,},+ {"cvi", t4cvi, 1,},+ {"cvr", t4cvr, 1,},+ /* B.3 Relational, boolean, and bitwise operators */
+ {"eq", t4eq, 2,},+ {"ne", t4ne, 2,},+ {"gt", t4gt, 2,},+ {"ge", t4ge, 2,},+ {"lt", t4lt, 2,},+ {"le", t4le, 2,},+ {"and", t4and, 2,},+ {"or", t4or, 2,},+ {"xor", t4xor, 2,},+ {"not", t4not, 1,},+ {"bitshift", t4bitshift, 2,},+ {"true", t4true, 0,},+ {"false", t4false, 0,},+ /* B.4 Conditional operators */
+ {"if", t4if, 2,},+ {"ifelse", t4ifelse, 3,},+ /* B.5 Stack operators */
+ {"pop", t4pop, 1,},+ {"exch", t4exch, 2,},+ {"dup", t4dup, 1,},+ {"copy", t4copy, -1,},+ {"index", t4index, -1,},+ {"roll", t4roll, -2,},};
--
⑨