1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701
|
<HTML>
<HEAD>
<!-- Created with AOLpress/2.0 -->
<!-- AP: Created on: 18-Jan-2002 -->
<!-- AP: Last modified: 14-Jul-2006 -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<!--<TITLE>Writing scripts to change fonts in FontForge</TITLE>-->
<TITLE>FontForge でフォントを変更するためのスクリプトの書き方</TITLE>
<LINK REL="icon" href="../../_static/fftype16.png">
<LINK REL="stylesheet" TYPE="text/css" HREF="FontForge.css">
</HEAD>
<BODY>
<DIV id="in">
<H1 ALIGN=Center>
<!--Writing scripts to change fonts in FontForge-->
FontForge でフォントを変更するためのスクリプトの書き方
</H1>
<P>
<!--
FontForge includes an interpreter so you can write scripts to modify fonts. -->
FontForge はインタプリタを内蔵しているので、フォントを変更するためのスクリプトを書くことができます。
<UL>
<LI>
<!-- <A HREF="scripting-tutorial.html">Scripting tutorial</A> -->
<A HREF="scripting-tutorial.html">スクリプト処理のチュートリアル</A>
<LI>
<!-- <A HREF="#Starting">Invoking a script</A> -->
<A HREF="#Starting">スクリプトの呼び出し方</A>
<LI>
<!-- <A HREF="#Language">Scripting language</A> -->
<A HREF="#Language">スクリプト言語</A>
<UL>
<LI>
<!-- <A HREF="#variables">Built in variables</A> -->
<A HREF="#variables">組込み変数</A>
<LI>
<!-- <A HREF="#procedures">Built in procedures</A> -->
<A HREF="#procedures">組込み手続き</A>
<LI>
<!-- <A HREF="#Example">Examples</A> -->
<A HREF="#Example">例</A>
</UL>
<LI>
<!-- <A HREF="scripting.html#Execute">The Execute Script dialog</A> -->
<A HREF="scripting.html#Execute">「スクリプトを実行」ダイアログ</A>
<LI>
<!-- <A HREF="#menu">The Scripts menu</A> -->
<A HREF="#menu">「スクリプト」メニュー</A>
</UL>
<H2>
<!-- <A NAME="Starting">Invoking scripts</A> -->
<A NAME="Starting">スクリプトの呼び出し方</A>
</H2>
<P>
<!--
If you start fontforge with a script on the command line it will not put
up any windows and it will exit when the script is done. -->
スクリプトを指定して FontForge をコマンドラインから起動したときはウィンドウは表示されず、スクリプトが終了した時にプログラムの終了となります。
<BLOCKQUOTE>
<PRE>$ fontforge -script scriptfile.pe {fontnames}
</PRE>
</BLOCKQUOTE>
<P>
<!--
FontForge can also be used as an interpreter that the shell will automatically
pass scripts to. If you a mark your script files as executable<BR>
<CODE> $ chmod +x scriptfile.pe</CODE><BR>
and begin each one with the line<BR>
<CODE> #!/usr/local/bin/fontforge</CODE><BR>
(or wherever fontforge happens to reside on your system) then you can invoke
the script just by typing<BR>
<CODE> $ scriptfile.pe {fontnames}</CODE> -->
FontForge は、シェルが自動的にスクリプトを渡すようなインタプリタとして使うこともできます。
スクリプトファイルが実行可能になるように<BR>
<CODE> $ chmod +x scriptfile.pe</CODE><BR>
として、それらのファイルの先頭の行に<BR>
<CODE> #!/usr/local/bin/fontforge</CODE><BR>
(または、システム上で FontForge が置かれているどこか別の場所) を書き加えることにより、<BR>
<CODE> $ scriptfile.pe {fontnames}</CODE><BR>
と打つだけでスクリプトを起動できるようになります。
<P>
<!--
If you wish FontForge to read a script from stdin then you can use "-" as
a "filename" for stdin. (If you build FontForge without X11 then fontforge
will attempt to read a script file from <CODE>stdin</CODE> if none is given
on the command line.) -->
FontForge に標準入力からスクリプトを読み込ませたい場合は、“-”を標準入力を表すファイル名として使用することができます。
(もし FontForge を X11 無しで作成した場合、コマンドラインに何も指定しなければ、FontForge はスクリプトを標準入力から読もうと試みます。)
<P>
<!--
You can also start a script from within FontForge with
<CODE>File->Execute Script</CODE>, and you can use the Preference Dlg
to define a set of frequently used scripts which can be invoked directly
by menu. -->
また、FontForge を使用中に、<CODE>ファイル(<U>F</U>)</CODE>→<CODE>スクリプトを実行(<U>X</U>)...</CODE> メニューを用いてスクリプトを起動することもできますし、頻繁に用いるスクリプトをプリファレンスダイアログで登録してメニューから直接起動可能なように設定することもできます。
<P>
<!--
The scripting language provides access to much of the functionality found
in the font view's menus. It does not currently (and probably never will)
provide access to everything. (If you find a lack let me know, I may put
it in for you). It does not provide commands for building up a glyph out
of splines, instead it allows you to do high level modifications to glyphs. -->
スクリプト言語により、フォント表示画面のメニューに見られる機能の多くを使用することができます。
現在のところ (将来もそうでしょうが) 全ての対象にアクセスできるわけではありません。
(もし何か欠けている機能があったら作者に知らせてください。それを追加しましょう)。
スクリプト言語は曲線からグリフを組み立てるコマンドを提供する物ではなく、グリフに対する高レベルな修正を可能にするための物です。
<P>
<!--
If you set the environment variable <CODE>PFAEDIT_VERBOSE</CODE> (it doesn't
need a value, just needs to be set) then FontForge will print scripts to
stdout as it executes them. -->
環境変数 <CODE>PFAEDIT_VERBOSE</CODE> が定義されている場合 (値を設定する必要はなく、定義するだけで十分です) FontForge は、スクリプトを実行するごとにその内容を標準出力に書き出します。
<P>
<P>
<!--
In general I envision this as being useful for things like taking a latin
font and extending it to contain cyrillic glyphs. So the script might: -->
一般的に言って、作者はこの機能を例えばラテン文字フォントを入力としてキリル文字のグリフを含むように拡張するような作業に役立つことを思い描いています。この場合、スクリプトはこのような物になるでしょう:
<UL>
<LI>
<!-- Reencode the font -->
フォントのコード変換を行う。
<LI>
<!-- Place a reference to Latin "A" at Cyrillic "A" -->
ラテン文字“A”への参照をキリル文字“А”に配置する
<LI>
<!-- Copy Latin "R" to Cyrillic "YA" -->
ラテン文字“R”をキリル文字“Я”にコピーする
<LI>
<!-- Flip "YA" horizontally -->
“Я”を水平方向に反転する
<LI>
<!-- Correct its direction -->
パスの向きを修正する
<LI>
<!-- ... and so forth -->
……等々
</UL>
<H2>
<!-- Scripting <A NAME="Language">Language</A>-->
スクリプト<A NAME="Language">言語</A>
</H2>
<P>
<!--
The syntax is rather like a mixture of C and shell commands. Every file
corresponds to a procedure. As in a shell script arguments passed to the
file are identified as $1, $2, ... $n. $0 is the file name itself. $argc
gives the number of arguments. $argv[<expr>] provides array access
to the arguments. -->
スクリプトの構文は、C とシェルコマンドを混ぜ合わせた物にかなり似ています。
各ファイルは手続きに対応します。
シェルスクリプトと同様に、スクリプトファイルに渡された引数は
$1, $2, …, $n という識別子で用いることができます。
$0 はスクリプトそれ自身です。
$argc は引数の個数を表します。
$argv[<式>] の形で、コマンドの引数を配列としてアクセスすることができます。
<P>
<!--
Terms can be -->
項は以下のいずれかを取ることができます。
<UL>
<LI>
<!-- A variable name (like "$1" or "i" or "@fontvar" or "_global")<BR>
The scope of the variable depends on the initial character of its name. -->
変数名 (例えば“$1”や“i”や“@fontvar”や“_global”のような)<BR>
変数のスコープは、名前の 1 文字目によって決まります。
<UL>
<LI>
<!-- A '$' signifies that it is a built-in variable. The user cannot create any
new variables beginning with '$'. Some, but not all, of these may be assigned
to. -->
‘$’は組込み変数を示します。ユーザは‘$’で始まる変数を新しく作ることはできません。それらの一部 (全部ではありません) は、値を代入することができます。
<LI>
<!-- A '_' signifies that the variable is global, it is always available. You
can use these to store context across different script files (or to access
data within nested script files). -->
‘_’はグローバル変数を示します。これは常に利用可能です。これらは、異なるスクリプトファイル間で (または、ネストしたスクリプトファイル内で) 共通のコンテキストを格納するのに用いることができます。
<LI>
<!-- A '@' signifies that the variable is associated with the font. Any two scripts
looking at the same font will have access to the same variables. -->
‘@’は、変数がフォントに固有の物であることを示します。同じフォントを参照する 2 つのスクリプトは常に同じ変数にアクセスします。
<LI>
<!-- A variable which begins with a letter is a local variable. It is only meaningful
within the current script file. Nested script files may have different variables
with the same names. -->
英文字で始まる変数はローカル変数です。それらは現在のスクリプトファイルの中でしか意味を持ちません。ネストしたスクリプトファイルの中では同じ名前の異なる変数を使用することができます。
</UL>
<LI>
<!-- an integer expressed in decimal, hex or octal -->
10 進, 8 進または 16 進表記の整数
<LI>
<!-- a unicode code point (which has a prefix of "0u" or "0U" and is followed
by a string of hex digits. This is only used by the select command. -->
Unicode のコードポイント (プレフィクス“0u”または“0U”の後ろに 16 進数表をつないだもの)。これは Select() コマンドでのみ使うことができます。
<LI>
<!-- a real number (in "C" locale format - - "." as the decimal point character)-->
実数 (“C”ロケールの書式 — 小数点は“.”)
<LI>
<!-- A string which may be enclosed in either double or single quotes. String
tokens are limited to 256 bytes. "\n" can be used to represent a newline
character. (If you need longer strings use the concatenation operator). -->
二重引用符または一重引用符で囲まれた文字列。文字列トークンは 256 バイトまでに制限されています。改行文字を表すのに "\n" を使用することができます。(より長い文字列が必要な場合、連結演算子を使用してください)。
<LI>
<!-- a procedure to call or file to invoke. -->
手続きの呼び出しまたは実行するファイル
<LI>
<!-- an expression within parentheses -->
括弧に囲まれた式
<LI>
<!-- a series of expressions (separated by commas) within brackets, as <CODE>[1,
2, 3, 5, 8]</CODE>, used to create an array. -->
(カンマで区切られた) 式の列を角括弧に入れたもの。例えば、<CODE>[1, 2, 3, 5, 8]</CODE> のように。配列の作成に使用されます。
</UL>
<P>
<!-- There are three different comments supported: -->
以下の 3 種類のコメント形式がサポートされています:
<UL>
<LI>
<!-- Starting with a "#" character and proceeding to end of line -->
文字“#”から行末まで
<LI>
<!-- Starting with "//" and proceeding to end of line -->
“//”から行末まで
<LI>
<!-- Starting with "/*" and proceeding to "*/" -->
“/*”から“*/”まで
</UL>
<P>
<!--
<A NAME="Expressions">Expressions</A> are similar to those in C, a few operators
have been omitted, a few added from shell scripts. Operator precedence has
been simplified slightly. So operators (and their precedences) are: -->
<A NAME="Expressions">式</A>は C とほぼ同じですが、二、三の演算子は省かれ、二、三がシェルスクリプトから追加されています。演算子の優先順位はわずかに単純化されています。
その結果、演算子 (とそれらの優先順位) は以下のようになっています:
<UL>
<LI>
<!-- unary operators (+, -, !, ~, ++ (prefix and postfix), --(prefix and postfix),
() (procedure call), [] (array index), :h, :t, :r, :e<BR> -->
単項演算子 (+, -, !, ~, ++ (前置および後置), -- (前置および後置),
() (手続き呼び出し), [] (配列インデックス), :h, :t, :r, :e<BR>
<!-- Most of these are as expected in C, the last four are borrowed from shell
scripts and are applied to strings -->
これらの殆んどは、C と同じ意味です。最後の 4 個はシェルスクリプトから借りてきた物で、数式に以下のように適用されます。
<UL>
<LI>
<!-- :h gives the head (directory) of a pathspec -->
:h は、パス指定の先頭部分 (ディレクトリ) を返します。
<LI>
<!-- :t gives the tail (filename) of a pathspec -->
:t は、パス指定の末尾 (ファイル名) を返します。
<LI>
<!-- :r gives the pathspec without the extension (if any) -->
:r は、パス指定から拡張子 (があれば) を取り除いたものを返します。
<LI>
<!-- :e gives the extension -->
:e は、拡張子を返します。
</UL>
<LI>
<!-- *, /, % (binary multiplicative operators) -->
*, /, % (二項乗法演算子)
<LI>
<!-- +, - (binary arithmetic operators)<BR> -->
+, - (二項算術演算子)<BR>
<!-- If the first operand of + is a string then + will be treated as concatenation
rather than addition. If the second operand is a number it will be converted
to a string (decimal representation) and then concatenated. -->
+ の最初の引数が文字列ならば、+ は加算ではなく文字列連結として働きます。2 番目の文字列が数なら文字列 (10 進表記) に変換されてから結合されます。
<LI>
<!-- ==, !=, >, <, >=, <= (comparison operators, may be applied to
either two integers or two strings) -->
==, !=, >, <, >=, <= (比較演算子。2 個の整数または 2 個の文字列に適用できます)
<LI>
<!-- &&, & (logical and, bitwise and. (logical and will do short circuit
evaluation)) -->
&&, & (論理的 AND とビット毎の AND。(論理的 AND は、短絡評価を行います))
<LI>
<!-- ||, |, ^ (logical or, bitwise or, bitwise exclusive or (logical or will do
short circuit evaluation)) -->
||, |, ^ (論理的 OR とビット毎の OR, 排他的論理 OR。(論理的 OR は、短絡評価を行います))
<LI>
<!-- =, +=, -=, *=, /=, %= (assignment operators as in C. The += will act as
concatenation if the first operand is a string.) -->
=, +=, -=, *=, /=, %= (C と同様の代入演算子。最初の引数が文字列である場合、+= は文字列を結合します)
</UL>
<P>
<!--
Note there is no comma operator, and no "?:" operator. The precedence of
"and" and "or" has been simplified, as has that of the assignment operators.
-->
カンマ演算子、"?:" 演算子が存在しないことに注意してください。
“AND”,“OR”と、代入演算子の優先順位は単純化されています。
<P>
<!--
Procedure calls may be applied either to a name token, or to a string. If
the name or string is recognized as one of FontForge's internal procedures
it will be executed, otherwise it will be assumed to be a filename containing
another fontforge script file, this file will be invoked (since filenames
can contain characters not legal in name tokens it is important to allow
general strings to specify filenames). If the procedure name does not contain
a directory then it is assumed to be in the same directory as the current
script file. At most 25 arguments can be passed to a procedure. -->
手続き呼び出しは名前トークンまたは文字列に対して適用することができます。
名前または文字列が FontForge の内部手続きのどれかと認識された場合、それが実行されます。それ以外の場合は実行するファイルの名前であると見なされ、そのファイルが呼び出されます (ファイル名には、トークンとして使用できない文字を含むことができるため、ファイル名を指定するために文字列一般を指定できるのは肝要です)。
手続き名がディレクトリを含まない場合、現在のスクリプトファイルと同じディレクトリにある物と見なされます。手続きに渡すことのできる引数は最大で 25 個です。
<P>
<!--
Arrays are passed by reference, strings and integers are passed by value. -->
配列は参照渡しされます。文字列と整数は値渡しされます。
<P>
<!--
Variables may be created by assigning a value to them (only with the "="),
so:<BR>
<CODE> i=3</CODE><BR>
could be used to define "i" as a variable. Variables are limited in scope
to the current file, they will not be inherited by called procedures. -->
変数は、値を代入することによって (“=”のみで) 作成することができます。
ですから<BR>
<CODE> i=3</CODE><BR>
によって、“i”の変数定義を行うことができます。変数のスコープは現在のファイルのみに限定されているので、呼び出された手続きには引き継がれません。
<P>
<!--
A statement may be -->
文は以下のいずれかをとることができます。
<UL>
<LI>
<!-- an expression-->
1 個の式
<LI>
<!-- <CODE>if ( expression )<BR>
statements<BR>
{elseif ( expression )<BR>
statements}<BR>
[else<BR>
statements]<BR>
endif</CODE>-->
<CODE>if ( 式 )<BR>
文の並び<BR>
{elseif ( 式 )<BR>
文の並び}<BR>
[else<BR>
文の並び]<BR>
endif</CODE>
<LI>
<!-- <CODE>while ( expression )<BR>
statements<BR>
endloop</CODE>-->
<CODE>while ( 式 )<BR>
文の並び<BR>
endloop</CODE>
<LI>
<!-- <CODE>foreach<BR>
statements<BR>
endloop</CODE>-->
<CODE>foreach<BR>
文の並び<BR>
endloop</CODE>
<LI>
<!-- <CODE>return [ expression ]</CODE>-->
<CODE>return [ 式 ]</CODE>
<LI>
<CODE>shift</CODE>
</UL>
<P>
<!--
As with C, non-zero expressions are defined to be true.<BR>
A return statement may be followed by a return value (the expression) or
a procedure may return nothing (void).<BR>
The shift statement is stolen from shell scripts and shifts all arguments
down by one. (argument 0, the name of the script file, remains unchanged.<BR>
The foreach statement requires that there be a current font. It executes
the statements once for each glyph in the selection. Within the statements
only one glyph at a time will be selected. After execution the selection
will be restored to what it was initially. (Caveat: Don't reencode the font
within a foreach statement).<BR>
Statements are terminated either by a new line (you can break up long lines
with backslash newline) or a semicolon. -->
C と同様に、非ゼロとなる式は真であると定義されています。<BR>
return 文は、その後ろに返り値 (式) を指定するか、または手続きは何も値を返さずに return で終了することも可能です。<BR>
shift 文はシェルスクリプトから拝借した構文で、全ての引数を
1 個ずつシフトします。
(引数 0 のスクリプトファイル名は変更されません。)<BR>
foreach 文は、カレントフォントが存在する時のみ使用できます。
foreach 文は、選択したグリフ群に含まれる各グリフに対して 1 回ずつ実行されます。
文の内部では、一度に 1 個のグリフのみが選択されます。
実行が完了すると、最初に選択されていたグリフ群が元通りに戻されます。
(警告: foreach 文の内部でフォントのコード変換を行ってはいけません)。<BR>
文は改行 (改行の前にバックスラッシュを置くことによって、長い行を分割することができます) またはセミコロンで完結します。
<P>
<!--
Trivial example: -->
つまらない例:
<BLOCKQUOTE>
<!--<PRE>i=0; #semicolon is not needed here, but it's ok -->
<PRE>i=0; # このセミコロンは不要ですが、あっても構いません
while ( i<3 )
if ( i==1 /* <!--pointless comment -->無意味なコメント */ )
Print( "Got to one" ) // <!--Another comment-->もう一つコメント
endif
++i
endloop
</PRE>
</BLOCKQUOTE>
<P>
<!--
FontForge maintains the concept of a "current font"- - almost all commands
refer only to the current font (and require that there be a font). If you
start a script with File->Execute Script, the font you were editing will
be current, otherwise there will be no initial current font. The Open(),
New() and Close() commands all change the current font. FontForge also maintains
a list of all fonts that are currently open. This list is in no particular
order. The list starts with $firstfont. -->
FontForge には「カレントフォント」という概念があります——ほぼ全てのコマンドはカレントフォントのみを参照します (ですから、カレントフォントが定義されている必要があります)。
<CODE>ファイル(<U>F</U>)</CODE>→<CODE>スクリプトを実行(<U>X</U>)...</CODE> でスクリプトを起動した場合、現在編集中のフォントがカレントフォントとなり、そうでなければ初期状態ではカレントフォントは存在しません。
カレントフォントを変更するには Open() と New(), Close() の各コマンドを使います。
FontForge は、現在開かれたフォントのリストも保持しています。
このリストの並び順にはとくに意味はありません。
リスト内の最初のフォントは $firstfont です。
<P>
<!--
Similarly when working with cid keyed fonts, FontForge works in the "current
sub font", and most commands refer to this font. The CIDChangeSubFont() command
can alter that. -->
同様に、CID キー指定フォントを操作する時には、FontForge の操作対象は「現在のサブフォント」であり、ほとんどのコマンドはそのフォントを参照します。それを変更するのには CIDChageSubFont() を使うことができます。
<P>
<!--
All builtin <A NAME="variables">variables</A> begin with "$", you may not
create any variables that start with "$" yourself (though you may assign
to (some) already existing ones) -->
全ての組込み<A NAME="variables">変数</A> は“$”で始まるので、自分で新しく“$”で始まる変数を作ることはできません (既存の変数 (の一部) に値を代入することはできますが)。
<UL>
<LI>
<!-- <CODE>$0 </CODE>the current script filename -->
<CODE>$0 </CODE>現在実行中のスクリプトファイルの名前
<LI>
<!-- <CODE>$1 </CODE>the first argument to the script file -->
<CODE>$1 </CODE>スクリプトファイルに渡された最初の引数
<LI>
<!-- <CODE>$2 </CODE>the second argument to the script file -->
<CODE>$2 </CODE>スクリプトファイルに渡された 2 番目の引数
<LI>
...
<LI>
<!-- <CODE>$argc</CODE> the number of arguments passed to the script file (this
will always be at least 1 as $0 is always present) -->
<CODE>$argc</CODE> スクリプトファイルに渡された引数の個数 ($0 は常に存在するので、
最小値は 1 となります)
<LI>
<!-- <CODE>$argv </CODE>allows you to access the array of all the arguments -->
<CODE>$argv </CODE>により、全ての引数を配列としてアクセスすることができます
<LI>
<!-- <CODE>$curfont </CODE>the name of the filename in which the current font
resides -->
<CODE>$curfont </CODE>カレントフォントが含まれているファイルの名前
<LI>
<!-- <CODE>$firstfont </CODE>the name of the filename of the font which is first
on the font list (Can be used by Open()), if there are no fonts loaded this
returns an empty string. This can be used to determine if any font at all
is loaded into fontforge. -->
<CODE>$firstfont </CODE>
フォントリスト (Open() により作成可能です) の最初に位置するフォントのファイル名。
フォントを読み込んでいなければ、この値は空文字列となります。
この値によって、FontForge がフォントを読み込み済みかどうかを判別できます。
<LI>
<!-- <CODE>$nextfont </CODE>the name of the filename of the font which follows
the current font on the list (or the empty string if the current font is
the last one on the list) -->
<CODE>$nextfont </CODE>リスト内でカレントフォントの次に位置するファイルの名前。
(カレントフォントがリストの最後である場合は、空文字列)
<LI>
<!-- <CODE>$fontchanged</CODE> returns 1 if the current font has changed, 0 if
it has not changed since it was read in (or saved). -->
<CODE>$fontchanged </CODE>カレントフォントが変更されていれば 1,
フォントを読み込んでから (または保存してから) 変更が無ければ 0。
<LI>
<!-- <CODE>$fontname</CODE> the name contained in the postscript FontName field-->
<CODE>$fontname </CODE>postscript の FontName フィールドに含まれる名前
<LI>
<!-- <CODE>$familyname </CODE>the name contained in the postscript FamilyName
field -->
<CODE>$familyname </CODE>postscript の FamilyName フィールドに含まれる名前
<LI>
<!-- <CODE>$fullname </CODE>the name contained in the postscript FullName field-->
<CODE>$fullname </CODE>postscript の FullName フィールドに含まれる名前
<LI>
<!-- <CODE>$fondname </CODE>if set this name indicates what FOND the current font
should be put in under Generate Mac Family.-->
<CODE>$fondname </CODE>これがセットされている場合、カレントフォントを <CODE>Macファミリーを出力(<U>F</U>)</CODE> で出力したときの FOND の名前
<LI>
<!-- <CODE>$weight </CODE>the name contained in the postscript Weight field-->
<CODE>$weight </CODE>postscript の Weight フィールドに含まれる名前
<LI>
<!-- <CODE>$copyright </CODE>the name contained in the postscript Notice field-->
<CODE>$copyright </CODE>postscript の Notice フィールドに含まれる名前
<LI>
<!-- <CODE>$filename </CODE>the name of the file containing the font.-->
<CODE>$filename </CODE>フォントが含まれるファイルの名前
<LI>
<!-- <CODE>$fontversion</CODE> the string containing the font's version-->
<CODE>$fontversion </CODE>フォントのバージョンを示す文字列
<LI>
<!-- <CODE>$cidfontname </CODE>returns the fontname of the top-level cid-keyed
font (or the empty string if there is none)<BR>
Can be used to detect if this is a cid keyed font. -->
<CODE>$cidfontname </CODE>はトップレベルの CID-Keyed フォントの名前
(存在しない場合は空文字列) を返します。<BR>
フォントが CID-Keyed フォントであるの判別に利用できます。
<LI>
<!-- <CODE>$cidfamilyname, $cidfullname, $cidweight, $cidcopyright </CODE>similar
to above -->
<CODE>$cidfamilyname, $cidfullname, $cidweight, $cidcopyright </CODE>上記の各項目と同様です。
<LI>
<!-- <CODE>$mmcount </CODE>returns 0 for non multiple master fonts, returns the
number of instances in a multiple master font. -->
<CODE>$mmcount </CODE>マルチプルマスターフォントに含まれるインスタンスの個数 (マルチプルマスターフォントでない場合は 0)
<LI>
<!-- <CODE>$italicangle </CODE>the value of the postscript italic angle field -->
<CODE>$italicangle </CODE>PostScript の italic angle フィールドの値
<LI>
<!-- <CODE>$curcid </CODE>returns the fontname of the current font-->
<CODE>$curcid </CODE>カレントフォントのフォント名を返します。
<LI>
<!-- <CODE>$firstcid </CODE>returns the fontname of the first font within this
cid font-->
<CODE>$firstcid </CODE>現在の CID フォントに含まれる最初のフォントの名前を返します。
<LI>
<!-- <CODE>$nextcid </CODE>returns the fontname of the next font within this cid
font (or the empty string if the current sub-font is the last)-->
<CODE>$nextcid </CODE>現在の CID フォントに含まれる次のフォントの名前 (現在のサブフォントが最後の 1 個である場合は空文字列) を返します
<LI>
<!-- <CODE>$macstyle </CODE>returns the value of the macstyle field (a set of
bits indicating whether the font is bold, italic, condensed, etc.)-->
<CODE>$macstyle </CODE>MacStyle フィールド (フォントがボールド・イタリック・コンデンスト等であるかどうかを示すビットの集まり) を返します。
<LI>
<!-- <CODE>$bitmaps </CODE>returns an array containing all bitmap pixelsizes generated
for this font. (If the font database contains greymaps then they will be
indicated in the array as
<CODE>(<BitmapDepth><<16)|<PixelSize></CODE>)-->
<CODE>$bitmaps </CODE>このフォントにおいて作成されたビットマップのピクセルサイズを全て含む配列を返します
(フォントデータベースにグレイマップが含まれる場合、その値は
<CODE>(<BitmapDepth><<16)|<PixelSize></CODE>
という配列で表されます)。
<LI>
<!-- <CODE>$order </CODE>returns an integer containing either 2 (for truetype
fonts) or 3 (for postscript fonts). This indicates whether the font uses
quadratic or cubic splines.
<CODE>$order</CODE> は 2 (TrueType フォントの場合) または 3 (PostScript フォントの場合) のどちらかの整数値を返します。これは、フォントが 2 次スプラインと 3 次スプラインのどちらを使用しているかを表します。
<LI>
<!-- <CODE>$em</CODE> returns the number of em-units used by the font. -->
<CODE>$em</CODE> はフォントが使用する em ユニットの大きさを返します。
<LI>
<!-- <CODE>$ascent </CODE>returns the ascent of the font -->
<CODE>$ascent</CODE> はフォントの高さを返します。
<LI>
<!-- <CODE>$descent </CODE>returns the descent of the font. -->
<CODE>$descent</CODE> はフォントの深さを返します。
<LI>
<!-- <CODE>$selection</CODE> returns an array containing one entry for each glyph
in the current font indicating whether that glyph is selected or not
(0=>not, 1=>selected) -->
<CODE>$selection</CODE> カレントフォントの各グリフが 1 項目に対応し、そのグリフが選択されているか否か (0=>非選択, 1=>選択)を示す配列を返します。
<LI>
<!-- <CODE>$panose</CODE> returns an array containing the 10 panose values for
the font. -->
<CODE>$panose</CODE> カレントフォントの 10 要素の panose 値を含む配列を返します。
<LI>
<!-- <CODE>$trace</CODE> if this is set to one then FontForge will trace each
procedure call. -->
<CODE>$trace</CODE> この値が (訳註: 非 0 に) セットされていると、FontForge
は、手続きを呼び出すごとにトレース表示を行います。
<LI>
<!-- <CODE>$version</CODE> returns a string containing the current version of
fontforge. This should look something like "20050817". -->
<CODE>$version</CODE> 現在実行中の FontForge のバージョンを含む文字列を返します。
この値は“20050817”のような書式です。
<LI>
<!-- <CODE>$</CODE><<A NAME="Preference">Preference</A> Item> (for example
<CODE>$AutoHint</CODE>) allows you to examine the value of that preference
item (to set it use
<CODE><A HREF="scripting-alpha.html#SetPref">SetPref</A></CODE>) -->
<CODE>$</CODE><<A NAME="Preference">環境設定</A>項目> (例えば
<CODE>$AutoHint</CODE>) により、その環境設定項目に対応する値を調べることができます (値の設定には
<CODE><A HREF="scripting-alpha.html#SetPref">SetPref</A></CODE> を使用してください)
</UL>
<P>
<!--
The following example will perform an action on all loaded fonts: -->
以下の例では、読み込み済みの全フォントに対して同じ操作を実行します。
<BLOCKQUOTE>
<PRE>file = $firstfont
while ( file != "" )
Open(file)
<!--/* Do Stuff */-->/* 操作を実行 */
file = $nextfont
endloop
</PRE>
</BLOCKQUOTE>
<P>
<!--
The built in <A NAME="procedures">procedures</A> are very similar to the
menu items with the same names. Often the description here is sketchy, look
at the menu item for more information. -->
組込み <A NAME="procedures">手続き</A> の動作は、同じ名前のメニュー項目とほとんど同じです。ここでの説明はしばしば概要しか示されていませんので、より詳しい情報は当該のメニュー項目を調べてください。
<UL>
<LI>
<!-- <A HREF="scripting-alpha.html">Built-in procedures in alphabetic order</A> -->
<A HREF="scripting-alpha.html">組込み手続きのアルファベット順一覧</A>
<LI>
<!-- <A HREF="#no-font">Built-in procedures that do not require a font</A> -->
<A HREF="#no-font">フォントを必要としない組込み手続き</A>
<LI>
<!-- <A HREF="#file-menu">File menu</A> -->
<A HREF="#file-menu"><CODE>ファイル(<U>F</U>)</CODE>メニュー</A>
<LI>
<!-- <A HREF="#files">File manipulation</A> -->
<A HREF="#files">ファイル操作</A>
<LI>
<!-- <A HREF="#edit-menu">Edit menu</A> -->
<A HREF="#edit-menu"><CODE>編集(<U>E</U>)</CODE>メニュー</A>
<LI>
<!-- <A HREF="#select-menu">Select menu</A> -->
<A HREF="#select-menu"><CODE>選択(<U>S</U>)</CODE>サブメニュー</A>
<LI>
<!-- <A HREF="#element-menu">Element menu</A> -->
<A HREF="#element-menu"><CODE>エレメント(<U>L</U>)</CODE>メニュー</A>
<LI>
<!-- <A HREF="#font-info">Font information</A> -->
<A HREF="#font-info">フォント情報</A>
<LI>
<!-- <A HREF="#glyph-info">Glyph information</A> -->
<A HREF="#glyph-info">グリフ情報</A>
<LI>
<!-- <A HREF="#ATT">Advanced Typography</A> -->
<A HREF="#ATT">高度組版機能</A>
<LI>
<!-- <A HREF="#encoding-menu">Encoding menu</A> -->
<A HREF="#encoding-menu"><CODE>エンコーディング(<U>N</U>)</CODE>メニュー</A>
<LI>
<!-- <A HREF="#hint-menu">Hint menu</A> -->
<A HREF="#hint-menu"><CODE>ヒント(<U>H</U>)</CODE>メニュー</A>
<LI>
<!-- <A HREF="#metrics-menu">Metrics menu</A> -->
<A HREF="#metrics-menu"><CODE>メトリック(<U>M</U>)</CODE>メニュー</A>
<LI>
<!-- <A HREF="#MM">Multiple master</A> -->
<A HREF="#MM">マルチプルマスター</A>
<LI>
<!-- <A HREF="#CID">CID keyed fonts</A> -->
<A HREF="#CID">CID キー指定フォント</A>
<LI>
<!-- <A HREF="#user">User interaction</A> -->
<A HREF="#user">ユーザとのやりとり</A>
<LI>
<!-- <A HREF="#prefs">Preferences</A> -->
<A HREF="#prefs">環境設定</A>
<LI>
<!-- <A HREF="#math">Math</A> -->
<A HREF="#math">数学関数</A>
<LI>
<A HREF="#unicode">Unicode</A>
<LI>
<!-- <A HREF="#strings">String manipulation</A> -->
<A HREF="#strings">文字列操作</A>
<LI>
<!-- <A HREF="#arrays">Arrays</A> -->
<A HREF="#arrays">配列</A>
<LI>
<!-- <A HREF="#misc">Miscellaneous</A> -->
<A HREF="#misc">その他</A>
<LI>
<!-- <A HREF="#Deprecated">Deprecated</A> Names -->
<A HREF="#Deprecated">廃止された</A>名前
</UL>
<!--
<H3 ALIGN=Center>
<!--Built-in procedures in <A NAME="alpha">alphabetic</A> order -->
組込み手続きの<A NAME="alpha">アルファベット順</A>一覧
</H3>
<P ALIGN=Center>
- <A HREF="scripting-alpha.html#A">A</A> -
<A HREF="scripting-alpha.html#B">B</A> -
<A HREF="scripting-alpha.html#C">C</A> -
<A HREF="scripting-alpha.html#D">D</A> -
<A HREF="scripting-alpha.html#E">E</A> -
<A HREF="scripting-alpha.html#F">F</A> -
<A HREF="scripting-alpha.html#G">G</A> -
<A HREF="scripting-alpha.html#H">H</A> - <A HREF="scripting-alpha.html#I">I
</A>- <A HREF="scripting-alpha.html#J">J </A>-
<A HREF="scripting-alpha.html#K">K</A> -
<A HREF="scripting-alpha.html#L">L</A> -
<A HREF="scripting-alpha.html#M">M</A> -
<A HREF="scripting-alpha.html#N">N</A> -
<A HREF="scripting-alpha.html#O">O</A> -
<A HREF="scripting-alpha.html#P">P</A> -
<A HREF="scripting-alpha.html#Q">Q</A> -
<A HREF="scripting-alpha.html#R">R</A> -
<A HREF="scripting-alpha.html#S">S</A> - <A HREF="scripting-alpha.html#T">T
</A>- <A HREF="scripting-alpha.html#U">U </A>-
<A HREF="scripting-alpha.html#V">V </A>-
<A HREF="scripting-alpha.html#W">W</A> - <A HREF="scripting-alpha.html#X">X
</A>- <A HREF="scripting-alpha.html#Y">Y</A> -
<A HREF="scripting-alpha.html#Z">Z </A>-
<H3 ALIGN=Center>
<!--Built-in procedures that do not require a <A NAME="no-font">loaded font</A> -->
<A NAME="no-font">フォントを読み込む</A>必要がない組込み手続き</A></H3>
</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#Array">Array(size)</A>
<LI>
<A HREF="scripting-alpha.html#AskUser">AskUser(question[,default-answer])</A>
<LI>
<A HREF="scripting-alpha.html#ATan2">ATan2(val1,val2)</A>
<LI>
<A HREF="scripting-alpha.html#Ceil">Ceil(real)</A>
<LI>
<A HREF="scripting-alpha.html#Chr">Chr(int)</A>
<LI>
<A HREF="scripting-alpha.html#Cos">Cos(val)</A>
<LI>
<A HREF="scripting-alpha.html#Floor">Floor(real)</A>
<LI>
<A HREF="scripting-alpha.html#Error">Error(str)</A>
<LI>
<A HREF="scripting-alpha.html#Exp">Exp(val)</A>
<LI>
<A HREF="scripting-alpha.html#DefaultOtherSubrs">DefaultOtherSubrs()</A>
<LI>
<A HREF="scripting-alpha.html#FileAccess">FileAccess(filename[,prot])</A>
<LI>
<A HREF="scripting-alpha.html#FontsInFile">FontsInFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#GetEnv">GetEnv(str)</A>
<LI>
<A HREF="scripting-alpha.html#GetPref">GetPref(str)</A>
<LI>
<A HREF="scripting-alpha.html#Int">Int(real)</A>
<LI>
<A HREF="scripting-alpha.html#IsFinite">IsFinite(real)</A>
<LI>
<A HREF="scripting-alpha.html#IsNan">IsNan(real)</A>
<LI>
<A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#LoadNamelist">LoadNamelist(filename)</A>
<LI>
<A HREF="scripting-alpha.html#LoadNamelistDir">LoadNamelistDir([directory-name])</A>
<LI>
<A HREF="scripting-alpha.html#LoadPrefs">LoadPrefs()</A>
<LI>
<A HREF="scripting-alpha.html#LoadStringFromFile">LoadStringFromFile("filename")</A>
<LI>
<A HREF="scripting-alpha.html#Log">Log(val)</A>
<LI>
<A HREF="scripting-alpha.html#New">New()</A>
<LI>
<A HREF="scripting-alpha.html#Open">Open(filename[,flags])</A>
<LI>
<A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
<LI>
<A HREF="scripting-alpha.html#PostNotice">PostNotice(str)</A>
<LI>
<A HREF="scripting-alpha.html#Pow">Pow(val1,val2)</A>
<LI>
<A HREF="scripting-alpha.html#Print">Print(arg1,arg2,arg3,...)</A>
<LI>
<A HREF="scripting-alpha.html#Rand">Rand()</A>
<LI>
<A HREF="scripting-alpha.html#ReadOtherSubrsFile">ReadOtherSubrsFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#Real">Real(int)</A>
<LI>
<A HREF="scripting-alpha.html#Round">Round(real)</A>
<LI>
<A HREF="scripting-alpha.html#SavePrefs">SavePrefs()</A>
<LI>
<A HREF="scripting-alpha.html#SetPref">SetPref(str,val[,val2])</A>
<LI>
<A HREF="scripting-alpha.html#SizeOf">SizeOf(arr)</A>
<LI>
<A HREF="scripting-alpha.html#Sin">Sin(val)</A>
<LI>
<A HREF="scripting-alpha.html#Sqrt">Sqrt(val)</A>
<LI>
<A HREF="scripting-alpha.html#Strcasestr">Strcasestr(haystack,needle)</A>
<LI>
<A HREF="scripting-alpha.html#Strcasecmp">Strcasecmp(str1,str2)</A>
<LI>
<A HREF="scripting-alpha.html#Strlen">Strlen(str)</A>
<LI>
<A HREF="scripting-alpha.html#Strrstr">Strrstr(haystack,needle)</A>
<LI>
<A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
<LI>
<A HREF="scripting-alpha.html#Strstr">Strstr(haystack,needle)</A>
<LI>
<A HREF="scripting-alpha.html#Strsub">Strsub(str,start[,end])</A>
<LI>
<A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
<LI>
<A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
<LI>
<A HREF="scripting-alpha.html#Tan">Tan(val)</A>
<LI>
<A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
<LI>
<A HREF="scripting-alpha.html#TypeOf">TypeOf(any)</A>
<LI>
<A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
<LI>
<A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
<LI>
<A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
<LI>
<A HREF="scripting-alpha.html#WriteStringToFile">WriteStringToFile("string","Filename"[,append])</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="file-menu">File Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="file-menu"><CODE>ファイル(<U>F</U>)</CODE>メニュー</A>と同じようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#Close">Close()</A>
<LI>
<A HREF="scripting-alpha.html#ControlAfmLigatureOutput">ControlAfmLigatureOutput(script,lang,ligature-tag-list)</A>
<LI>
<A HREF="scripting-alpha.html#Export">Export(format[,bitmap-size])</A>
<LI>
<A HREF="scripting-alpha.html#FontsInFile">FontsInFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#Generate">Generate(filename[,bitmaptype[,fmflags[,res[,mult-sfd-file[,namelist-name]]]]])</A>
<LI>
<A HREF="scripting-alpha.html#GenerateFamily">GenerateFamily(filename,bitmaptype,fmflags,array-of-font-filenames)</A>
<LI>
<A HREF="scripting-alpha.html#Import">Import(filename[,toback[,flags]])</A>
<LI>
<A HREF="scripting-alpha.html#MergeKern">MergeKern(filename)</A>
<LI>
<A HREF="scripting-alpha.html#New">New()</A>
<LI>
<A HREF="scripting-alpha.html#Open">Open(filename[,flags])</A>
<LI>
<A HREF="scripting-alpha.html#PrintFont">PrintFont(type[,pointsize[,sample-text/filename[,output-file]]])</A>
<LI>
<A HREF="scripting-alpha.html#PrintSetup">PrintSetup(type,[printer[,width,height]])</A>
<LI>
<A HREF="scripting-alpha.html#Quit">Quit(status)</A>
<LI>
<A HREF="scripting-alpha.html#Save">Save([filename])</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="files">File Manipulation</A></H3> -->
<H3 ALIGN=Center><A NAME="files">ファイル操作</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#FileAccess">FileAccess(filename[,prot])</A>
<LI>
<A HREF="scripting-alpha.html#LoadStringFromFile">LoadStringFromFile("filename")</A>
<LI>
<A HREF="scripting-alpha.html#WriteStringToFile">WriteStringToFile("string","Filename"[,append])</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="edit-menu">Edit Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="edit-menu"><CODE>編集(<U>E</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#Clear">Clear</A>
<LI>
<A HREF="scripting-alpha.html#ClearBackground">ClearBackground</A>
<LI>
<A HREF="scripting-alpha.html#Copy">Copy</A>
<LI>
<A HREF="scripting-alpha.html#CopyFgToBd">CopyFgToBd</A>
<LI>
<A HREF="scripting-alpha.html#CopyGlyphFeatures">CopyGlyphFeatures(arg,...)</A>
<LI>
<A HREF="scripting-alpha.html#CopyLBearing">CopyLBearing</A>
<LI>
<A HREF="scripting-alpha.html#CopyRBearing">CopyRBearing</A>
<LI>
<A HREF="scripting-alpha.html#CopyReference">CopyReference</A>
<LI>
<A HREF="scripting-alpha.html#CopyVWidth">CopyVWidth</A>
<LI>
<A HREF="scripting-alpha.html#CopyWidth">CopyWidth</A>
<LI>
<A HREF="scripting-alpha.html#Cut">Cut</A>
<LI>
<A HREF="scripting-alpha.html#Join">Join([fudge])</A>
<LI>
<A HREF="scripting-alpha.html#Paste">Paste</A>
<LI>
<A HREF="scripting-alpha.html#Paste">PasteInto</A>
<LI>
<A HREF="scripting-alpha.html#PasteWithOffset">PasteWithOffset(xoff,yoff)</A>
<LI>
<A HREF="scripting-alpha.html#ReplaceWithReference">ReplaceWithReference([fudge])</A>
<LI>
<A HREF="scripting-alpha.html#SameGlyphAs">SameGlyphAs</A>
<LI>
<A HREF="scripting-alpha.html#UnlinkReference">UnlinkReference</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="select-menu">Select Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="select-menu"><CODE>選択(<U>S</U>)</CODE>サブメニュー</A>のようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#Select">Select(arg1, arg2, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectAll">SelectAll</A>
<LI>
<A HREF="scripting-alpha.html#SelectAllInstancesOf">SelectAllInstancesOf</A>(name1[,...])
<LI>
<A HREF="scripting-alpha.html#SelectBitmap">SelectBitmap(size)</A>
<LI>
<A HREF="scripting-alpha.html#SelectByATT">SelectByATT(type,tags,contents,search-type)</A>
<LI>
<A HREF="scripting-alpha.html#SelectChanged">SelectChanged([merge])</A>
<LI>
<A HREF="scripting-alpha.html#SelectFewer">SelectFewer(arg1, arg2, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectFewerSingletons">SelectFewerSingletons(arg1, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectHintingNeeded">SelectHintingNeeded([merge])</A>
<LI>
<A HREF="scripting-alpha.html#SelectIf">SelectIf(arg1,arg2, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectInvert">SelectInvert()</A>
<LI>
<A HREF="scripting-alpha.html#SelectMore">SelectMore(arg1, arg2, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectMoreSingletons">SelectMoreSingletons(arg1, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectNone">SelectNone()</A>
<LI>
<A HREF="scripting-alpha.html#SelectSingletons">SelectSingletons(arg1, ...)</A>
<LI>
<A HREF="scripting-alpha.html#SelectWorthOutputting">SelectWorthOutputting()</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="element-menu">Element Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="element-menu"><CODE>エレメント(<U>L</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#AddAccent">AddAccent(accent[,pos])</A>
<LI>
<A HREF="scripting-alpha.html#AddExtrema">AddExtrema()</A>
<LI>
<A HREF="scripting-alpha.html#ApplySubstitution">ApplySubstitution(script,lang,tag)</A>
<LI>
<A HREF="scripting-alpha.html#AutoTrace">AutoTrace()</A>
<LI>
<A HREF="scripting-alpha.html#BitmapsAvail">BitmapsAvail(sizes)</A>
<LI>
<A HREF="scripting-alpha.html#BitmapsRegen">BitmapsRegen(sizes)</A>
<LI>
<A HREF="scripting-alpha.html#BuildAccented">BuildAccented()</A>
<LI>
<A HREF="scripting-alpha.html#BuildComposite">BuildComposite()</A>
<LI>
<A HREF="scripting-alpha.html#BuildDuplicate">BuildDuplicate()</A>
<LI>
<A HREF="scripting-alpha.html#CanonicalContours">CanonicalContours</A>()
<LI>
<A HREF="scripting-alpha.html#CanonicalStart">CanonicalStart</A>()
<LI>
<A HREF="scripting-alpha.html#CompareFonts">CompareFonts(other-font-filename,output-filename,flags)</A>
<LI>
<A HREF="scripting-alpha.html#CompareGlyphs">CompareGlyphs([pt_err[,spline_err[,pixel_off_frac[,bb_err[,compare_hints[,report_diffs_as_errors]]]]]])</A>
<LI>
<A HREF="scripting-alpha.html#CorrectDirection">CorrectDirection([unlinkrefs])</A>
<LI>
<A HREF="scripting-alpha.html#DefaultRoundToGrid">DefaultRoundToGrid()</A>
<LI>
<A HREF="scripting-alpha.html#DefaultUseMyMetrics">DefaultUseMyMetrics()</A>
<LI>
<A HREF="scripting-alpha.html#ExpandStroke">ExpandStroke(width)</A>
<LI>
<A HREF="scripting-alpha.html#FindIntersections">FindIntersections()</A>
<LI>
<A HREF="scripting-alpha.html#HFlip">HFlip([about-x])</A>
<LI>
<A HREF="scripting-alpha.html#Inline">Inline(width,gap)</A>
<LI>
<A HREF="scripting-alpha.html#InterpolateFonts">InterpolateFonts(percentage,other-font-name[,flags])</A>
<LI>
<A HREF="scripting-alpha.html#MergeFonts">MergeFonts(other-font-name[,flags])</A>
<LI>
<A HREF="scripting-alpha.html#Move">Move(delta-x,delta-y)</A>
<LI>
<A HREF="scripting-alpha.html#MoveReference">MoveReference(delta-x,delta-y,[refname/ref-unicode]+)</A>
<LI>
<A HREF="scripting-alpha.html#NearlyHvCps">NearlyHvCps([error[,err-denom]])</A>
<LI>
<A HREF="scripting-alpha.html#NearlyHvLines">NearlyHvLines([error[,err-denom]])</A>
<LI>
<A HREF="scripting-alpha.html#NearlyLines">NearlyLines(error)</A>
<LI>
<A HREF="scripting-alpha.html#NonLinearTransform">NonLinearTransform(x-expression,y-expression)</A>
<LI>
<A HREF="scripting-alpha.html#Outline">Outline(width)</A>
<LI>
<A HREF="scripting-alpha.html#OverlapIntersect">OverlapIntersect()</A>
<LI>
<A HREF="scripting-alpha.html#PositionReference">PositionReference(x,y,[refname/ref-unicode]+)</A>
<LI>
<A HREF="scripting-alpha.html#RemoveOverlap">RemoveOverlap()</A>
<LI>
<A HREF="scripting-alpha.html#Rotate">Rotate(angle[,ox,oy])</A>
<LI>
<A HREF="scripting-alpha.html#RoundToCluster">RoundToCluster([within[,max]])</A>
<LI>
<A HREF="scripting-alpha.html#RoundToInt">RoundToInt([factor])</A>
<LI>
<A HREF="scripting-alpha.html#Scale">Scale(factor[,yfactor][,ox,oy])</A>
<LI>
<A HREF="scripting-alpha.html#ScaleToEm">ScaleToEm(em-size)</A>
<LI>
<A HREF="scripting-alpha.html#Shadow">Shadow(angle,outline-width,shadow-width)</A>
<LI>
<A HREF="scripting-alpha.html#Simplify">Simplify()</A>
<LI>
<A HREF="scripting-alpha.html#Skew">Skew(angle[,ox,oy])</A>
<LI>
<A HREF="scripting-alpha.html#Transform">Transform(t1,t2,t3,t4,t5,t6)</A>
<LI>
<A HREF="scripting-alpha.html#VFlip">VFlip([about-y])</A>
<LI>
<A HREF="scripting-alpha.html#Wireframe">Wireframe(angle,outline-width,shadow-width)</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="font-info">Font Info</A></H3> -->
<H3 ALIGN=Center><A NAME="font-info">フォント情報</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#ChangePrivateEntry">ChangePrivateEntry(key,val)</A>
<LI>
<A HREF="scripting-alpha.html#ClearPrivateEntry">ClearPrivateEntry(key)</A>
<LI>
<A HREF="scripting-alpha.html#GetFontBoundingBox">GetFontBoundingBox()</A>
<LI>
<A HREF="scripting-alpha.html#GetMaxpValue">GetMaxpValue(field-name)</A>
<LI>
<A HREF="scripting-alpha.html#GetOS2Value">GetOS2Value(field-name)</A>
<LI>
<A HREF="scripting-alpha.html#GetPrivateEntry">GetPrivateEntry(key)</A>
<LI>
<A HREF="scripting-alpha.html#GetTeXParam">GetTeXParam(index)</A>
<LI>
<A HREF="scripting-alpha.html#GetTTFName">GetTTFName(lang,nameid)</A>
<LI>
<A HREF="scripting-alpha.html#HasPrivateEntry">HasPrivateEntry(key)</A>
<LI>
<A HREF="scripting-alpha.html#ScaleToEm">ScaleToEm(em-size)</A>
<LI>
<A HREF="scripting-alpha.html#SetFondName">SetFondName(fondname)</A>
<LI>
<A HREF="scripting-alpha.html#SetFontHasVerticalMetrics">SetFontHasVerticalMetrics(flag)</A>
<LI>
<A HREF="scripting-alpha.html#SetFontNames">SetFontNames(fontname[,family[,fullname[,weight[,copyright-notice[,fontversion]]]]])</A>
<LI>
<A HREF="scripting-alpha.html#SetFontOrder">SetFontOrder(order)</A>
<LI>
<A HREF="scripting-alpha.html#SetItalicAngle">SetItalicAngle(angle[,denom])</A>
<LI>
<A HREF="scripting-alpha.html#SetMacStyle">SetMacStyle(val)</A>
<LI>
<A HREF="scripting-alpha.html#SetMaxpValue">SetMaxpValue(field-name,value)</A>
<LI>
<A HREF="scripting-alpha.html#SetOS2Value">SetOS2Value(field-name,field-value)</A>
<LI>
<A HREF="scripting-alpha.html#SetPanose">SetPanose(array) SetPanose(index,value)</A>
<LI>
<A HREF="scripting-alpha.html#SetTeXParams">SetTeXParams(type,design-size,slant,space,stretch,shrink,xheight,quad,extraspace[...])</A>
<LI>
<A HREF="scripting-alpha.html#SetTTFName">SetTTFName(lang,nameid,utf8-string)</A>
<LI>
<A HREF="scripting-alpha.html#SetUniqueID">SetUniqueID(value)</A>
<LI>Some items (such as the font name) may be retrieved via built-in variables.
</UL>
<!--
<H3 ALIGN=Center><A NAME="glyph-info">Glyph Info</A></H3> -->
<H3 ALIGN=Center><A NAME="glyph-info">グリフ情報</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#DrawsSomething">DrawsSomething([arg])</A>
<LI>
<A HREF="scripting-alpha.html#GetPosSub">GetPosSub(feature-tag,script,lang)</A>
<LI>
<A HREF="scripting-alpha.html#GlyphInfo">GlyphInfo(str)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphColor">SetCharColor(color)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphComment">SetGlyphComment(comment)</A>
<LI>
<A HREF="scripting-alpha.html#SetCharName">SetGlyphName(name[,set-from-name-flag])</A>
<LI>
<A HREF="scripting-alpha.html#SetlyphChanged">SetGlyphChanged(flag)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphClass">SetGlyphClass(class-name)</A>
<LI>
<A HREF="scripting-alpha.html#SetUnicodeValue">SetUnicodeValue(uni[,set-from-value-flag])</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphTeX">SetGlyphTeX(height,depth[,subpos,suppos])</A>
<LI>
<A HREF="scripting-alpha.html#WorthOutputting">WorthOutputting([arg])</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that handle <A NAME="ATT">Advanced Typography</A></H3> -->
<H3 ALIGN=Center><A NAME="ATT">高度組版機能</A>を操作する組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#AddAnchorClass">AddAnchorClass(name,type,script-lang,tag,flags,merge-with)</A>
<LI>
<A HREF="scripting-alpha.html#AddAnchorPoint">AddAnchorPoint(name,type,x,y[,lig-index])</A>
<LI>
<A HREF="scripting-alpha.html#AddATT">AddATT(type,script-lang,tag,flags,variant)</A>
<LI>
<A HREF="scripting-alpha.html#ApplySubstitution">ApplySubstitution(script,lang,tag)</A>
<LI>
<A HREF="scripting-alpha.html#CheckForAnchorClass">CheckForAnchorClass(name)</A>
<LI>
<A HREF="scripting-alpha.html#DefaultATT">DefaultATT(tag)</A>
<LI>
<A HREF="scripting-alpha.html#HasPreservedTable">HasPreservedTable(tag)</A>
<LI>
<A HREF="scripting-alpha.html#LoadTableFromFile">LoadTableFromFile(tag,filename)</A>
<LI>
<A HREF="scripting-alpha.html#GetPosSub">GetPosSub(feature-tag,script,lang)</A>
<LI>
<A HREF="scripting-alpha.html#RemoveATT">RemoveATT(type,script-lang,tag)</A>
<LI>
<A HREF="scripting-alpha.html#RemoveAnchorClass">RemoveAnchorClass(name)</A>
<LI>
<A HREF="scripting-alpha.html#RemovePreservedTable">RemovePreservedTable(tag)</A>
<LI>
<A HREF="scripting-alpha.html#SaveTableToFile">SaveTableToFile(tag,filename)</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="encoding-menu">Encoding Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="encoding-menu"><CODE>エンコーディング(<U>N</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#CharCnt">CharCnt()</A>
<LI>
<A HREF="scripting-alpha.html#DetachGlyphs">DetachGlyphs</A>
<LI>
<A HREF="scripting-alpha.html#DetachAndRemoveGlyphs">DetachAndRemoveGlyphs</A>
<LI>
<A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#MultipleEncodingsToReferences">MultipleEncodingsToReferences()</A>
<LI>
<A HREF="scripting-alpha.html#Reencode">Reencode(encoding-name[,force])</A>
<LI>
<A HREF="scripting-alpha.html#RemoveDetachedGlyphs">RemoveDetachedGlyphs</A>()
<LI>
<A HREF="scripting-alpha.html#RenameGlyphs">RenameGlyphs(namelist-name)</A>
<LI>
<A HREF="scripting-alpha.html#SameGlyphAs">SameGlyphAs</A>
<LI>
<A HREF="scripting-alpha.html#SetCharCnt">SetCharCnt(cnt)</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="hint-menu">Hint Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="hint-menu"><CODE>ヒント(<U>H</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#AddHHint">AddHHint(start,width)</A>
<LI>
<A HREF="scripting-alpha.html#AddInstrs">AddInstrs(thingamy,replace,instrs)</A>
<LI>
<A HREF="scripting-alpha.html#AddVHint">AddVHint(start,width)</A>
<LI>
<A HREF="scripting-alpha.html#AutoCounter">AutoCounter()</A>
<LI>
<A HREF="scripting-alpha.html#AutoHint">AutoHint()</A>
<LI>
<A HREF="scripting-alpha.html#AutoInstr">AutoInstr()</A>
<LI>
<A HREF="scripting-alpha.html#ChangePrivateEntry">ChangePrivateEntry(key,val)</A>
<LI>
<A HREF="scripting-alpha.html#ClearCharCounterMasks">ClearCharCounterMasks()</A>
<LI>
<A HREF="scripting-alpha.html#ClearHints">ClearHints()</A>
<LI>
<A HREF="scripting-alpha.html#ClearInstrs">ClearInstrs()</A>
<LI>
<A HREF="scripting-alpha.html#ClearPrivateEntry">ClearPrivateEntry(key)</A>
<LI>
<A HREF="scripting-alpha.html#ClearTable">ClearTable(tag)</A>
<LI>
<A HREF="scripting-alpha.html#DontAutoHint">DontAutoHint()</A>
<LI>
<A HREF="scripting-alpha.html#FindOrAddCvtIndex">FindOrAddCvtIndex(value[,sign-matters])</A>
<LI>
<A HREF="scripting-alpha.html#GetCvtAt">GetCvtAt(index)</A>
<LI>
<A HREF="scripting-alpha.html#GetPrivateEntry">GetPrivateEntry(key)</A>
<LI>
<A HREF="scripting-alpha.html#HasPrivateEntry">HasPrivateEntry(key)</A>
<LI>
<A HREF="scripting-alpha.html#PrivateToCvt">PrivateToCvt()</A>
<LI>
<A HREF="scripting-alpha.html#ReplaceCharCounterMasks">ReplaceCharCounterMasks(array)</A>
<LI>
<A HREF="scripting-alpha.html#ReplaceCvtAt">ReplaceCvtAt(index,value)</A>
<LI>
<A HREF="scripting-alpha.html#SetCharCounterMask">SetCharCounterMask(cg,hint-index,hint-index,...)</A>
<LI>
<A HREF="scripting-alpha.html#SubstitutionPoints">SubstitutionPoints()</A>
</UL>
<!--
<H3 ALIGN=Center>Built-in procedures that act like the <A NAME="metrics-menu">Metrics Menu</A></H3> -->
<H3 ALIGN=Center><A NAME="metrics-menu"><CODE>メトリック(<U>M</U>)</CODE>メニュー</A>のようにふるまう組込み手続き</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#AutoKern">AutoKern(spacing,threshold[,kernfile])</A>
<LI>
<A HREF="scripting-alpha.html#AutoWidth">AutoWidth(spacing)</A>
<LI>
<A HREF="scripting-alpha.html#CenterInWidth">CenterInWidth()</A>
<LI>
<A HREF="scripting-alpha.html#SetKern">SetKern(ch2,offset)</A>
<LI>
<A HREF="scripting-alpha.html#RemoveAllKerns">RemoveAllKerns()</A>
<LI>
<A HREF="scripting-alpha.html#RemoveAllVKerns">RemoveAllVKerns()</A>
<LI>
<A HREF="scripting-alpha.html#SetLBearing">SetLBearing(lbearing[,relative])</A>
<LI>
<A HREF="scripting-alpha.html#SetRBearing">SetRBearing(rbearing[,relative])</A>
<LI>
<A HREF="scripting-alpha.html#SetVKern">SetVKern(ch2,offset)</A>
<LI>
<A HREF="scripting-alpha.html#SetVWidth">SetVWidth(vertical-width[,relative])</A>
<LI>
<A HREF="scripting-alpha.html#SetWidth">SetWidth(width[,relative])</A>
<LI>
<A HREF="scripting-alpha.html#VKernFromHKern">VKernFromHKern()</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="MM">Multiple master routines</A></H3> -->
<H3 ALIGN=Center><A NAME="MM">マルチプルマスター操作ルーチン</A></H3>
<LI>
<A HREF="scripting-alpha.html#MMAxisBounds">MMAxisBounds(axis)</A>
<LI>
<A HREF="scripting-alpha.html#MMAxisNames">MMAxisNames()</A>
<LI>
<A HREF="scripting-alpha.html#MMBlendToNewFont">MMBlendToNewFont(weights)</A>
<LI>
<A HREF="scripting-alpha.html#MMChangeInstance">MMChangeInstance(instance)</A>
<LI>
<A HREF="scripting-alpha.html#MMChangeWeight">MMChangeWeight(weights)</A>
<LI>
<A HREF="scripting-alpha.html#MMInstanceNames">MMInstanceNames()</A>
<LI>
<A HREF="scripting-alpha.html#MMWeightedName">MMWeightedName()</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="CID">CID routines</A></H3> -->
<H3 ALIGN=Center><A NAME="CID">CID フォント操作ルーチン</A></H3>
<LI>
<A HREF="scripting-alpha.html#CIDChangeSubFont">CIDChangeSubFont(new-sub-font-name)</A>
<LI>
<A HREF="scripting-alpha.html#CIDFlatten">CIDFlatten()</A>
<LI>
<A HREF="scripting-alpha.html#CIDFlattenByCMap">CIDFlattenByCMap(cmap-filename)</A>
<LI>
<A HREF="scripting-alpha.html#CIDSetFontNames">CIDSetFontNames(fontname[,family[,fullname[,weight[,copyright-notice]]]])</A>
<LI>
<A HREF="scripting-alpha.html#ConvertToCID">ConvertToCID(registry, ordering, supplement)</A>
<LI>
<A HREF="scripting-alpha.html#ConvertByCMap">ConvertByCMap(cmapfilename)</A>
<UL>
</UL>
<!--
<H3 ALIGN=Center><A NAME="user">User Interaction</A></H3> -->
<H3 ALIGN=Center><A NAME="user">ユーザとのやりとり</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#AskUser">AskUser(question[,default-answer])</A>
<LI>
<A HREF="scripting-alpha.html#Error">Error(str)</A>
<LI>
<A HREF="scripting-alpha.html#PostNotice">PostNotice(str)</A>
<LI>
<A HREF="scripting-alpha.html#Print">Print(arg1,arg2,arg3,...)</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="prefs">Preferences</A></H3> -->
<H3 ALIGN=Center><A NAME="prefs">環境設定</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#DefaultOtherSubrs">DefaultOtherSubrs()</A>
<LI>
<A HREF="scripting-alpha.html#GetPref">GetPref(str)</A>
<LI>
<A HREF="scripting-alpha.html#LoadEncodingFile">LoadEncodingFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#LoadNamelist">LoadNamelist(filename)</A>
<LI>
<A HREF="scripting-alpha.html#LoadNamelistDir">LoadNamelistDir([directory-name])</A>
<LI>
<A HREF="scripting-alpha.html#LoadPrefs">LoadPrefs()</A>
<LI>
<A HREF="scripting-alpha.html#ReadOtherSubrsFile">ReadOtherSubrsFile(filename)</A>
<LI>
<A HREF="scripting-alpha.html#SavePrefs">SavePrefs()</A>
<LI>
<A HREF="scripting-alpha.html#SetPref">SetPref(str,val[,val2])</A>
<!--
<LI>It it also possible to get the value of a preference item by preceding its
name with a dollar sign. -->
<LI>環境設定項目の値は、項目名の前にドル記号 ($) をつけた名前の変数によって得ることもできます。
</UL>
<!--
<H3 ALIGN=Center><A NAME="math">Math</A></H3> -->
<H3 ALIGN=Center><A NAME="math">数学関数</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#ATan2">ATan2(val1,val2)</A>
<LI>
<A HREF="scripting-alpha.html#Ceil">Ceil(real)</A>
<LI>
<A HREF="scripting-alpha.html#Chr">Chr(int)</A>
<LI>
<A HREF="scripting-alpha.html#Cos">Cos(val)</A>
<LI>
<A HREF="scripting-alpha.html#Exp">Exp(val)</A>
<LI>
<A HREF="scripting-alpha.html#Floor">Floor(real)</A>
<LI>
<A HREF="scripting-alpha.html#Int">Int(real)</A>
<LI>
<A HREF="scripting-alpha.html#IsFinite">IsFinite(real)</A>
<LI>
<A HREF="scripting-alpha.html#IsNan">IsNan(real)</A>
<LI>
<A HREF="scripting-alpha.html#Log">Log(val)</A>
<LI>
<A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
<LI>
<A HREF="scripting-alpha.html#Pow">Pow(val1,val2)</A>
<LI>
<A HREF="scripting-alpha.html#Rand">Rand()</A>
<LI>
<A HREF="scripting-alpha.html#Real">Real(int)</A>
<LI>
<A HREF="scripting-alpha.html#Round">Round(real)</A>
<LI>
<A HREF="scripting-alpha.html#Sin">Sin(val)</A>
<LI>
<A HREF="scripting-alpha.html#Sqrt">Sqrt(val)</A>
<LI>
<A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
<LI>
<A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
<LI>
<A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
<LI>
<A HREF="scripting-alpha.html#Tan">Tan(val)</A>
<LI>
<A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
<LI>
<A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
</UL>
<H3 ALIGN=Center><A NAME="unicode">Unicode</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#UCodePoint">UCodePoint(int)</A>
<LI>
<A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
<LI>
<A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="strings">String manipulation</A></H3> -->
<H3 ALIGN=Center><A NAME="strings">文字列操作</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#Chr">Chr(int)</A>
<LI>
<A HREF="scripting-alpha.html#GetEnv">GetEnv(str)</A>
<LI>
<A HREF="scripting-alpha.html#Ord">Ord(string[,pos])</A>
<LI>
<A HREF="scripting-alpha.html#Strcasecmp">Strcasecmp(str1,str2)</A>
<LI>
<A HREF="scripting-alpha.html#Strcasestr">Strcasestr(haystack,needle)</A>
<LI>
<A HREF="scripting-alpha.html#Strlen">Strlen(str)</A>
<LI>
<A HREF="scripting-alpha.html#Strrstr">Strrstr(haystack,needle)</A>
<LI>
<A HREF="scripting-alpha.html#Strskipint">Strskipint(str[,base])</A>
<LI>
<A HREF="scripting-alpha.html#Strstr">Strstr(haystack,needle)</A>
<LI>
<A HREF="scripting-alpha.html#Strsub">Strsub(str,start[,end])</A>
<LI>
<A HREF="scripting-alpha.html#Strtod">Strtod(str)</A>
<LI>
<A HREF="scripting-alpha.html#Strtol">Strtol(str[,base])</A>
<LI>
<A HREF="scripting-alpha.html#ToString">ToString(arg)</A>
<LI>
<A HREF="scripting-alpha.html#UnicodeFromName">UnicodeFromName(name)</A>
<LI>
<A HREF="scripting-alpha.html#Utf8">Utf8(int)</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="arrays">Arrays</A></H3> -->
<H3 ALIGN=Center><A NAME="arrays">配列操作</A></H3>
<UL><LI>
<A HREF="scripting-alpha.html#Array">Array(size)</A>
<LI>
<A HREF="scripting-alpha.html#SizeOf">SizeOf(arr)</A>
</UL>
<!--
<H3 ALIGN=Center><A NAME="misc">Miscellaneous</A></H3> -->
<H3 ALIGN=Center><A NAME="misc">その他</A></H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#InFont">InFont(arg)</A>
<LI>
<A HREF="scripting-alpha.html#TypeOf">TypeOf(any)</A>
<H3 ALIGN=Center>
<!--<A NAME="Deprecated">Deprecated Names</A> -->
<A NAME="Deprecated">廃止された名前</A>
</H3>
<UL>
<LI>
<A HREF="scripting-alpha.html#ClearGlyphCounterMasks">ClearCharCounterMasks()</A>
<LI>
<A HREF="scripting-alpha.html#GlyphInfo">CharInfo(str)</A>
<LI>
<A HREF="scripting-alpha.html#ReplaceGlyphCounterMasks">ReplaceCharCounterMasks(array)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphColor">SetCharColor(color)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphComment">SetCharComment(comment)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphCounterMask">SetCharCounterMask(cg,hint-index,hint-index,...)</A>
<LI>
<A HREF="scripting-alpha.html#SetGlyphName">SetCharName(name[,set-from-name-flag])</A>
</UL>
<P>
<HR>
<H2>
<!-- <A NAME="Example">Example</A>s -->
<A NAME="Example">例</A>
</H2>
<UL>
<LI>
<!-- <A HREF="http://cvs.sourceforge.net/viewcvspy/fontforge/fontforge/test/">FontForge's
testsuite</A> (such as it is) -->
<A HREF="http://cvs.sourceforge.net/viewcvs.py/fontforge/fontforge/test/">FontForge
のテストスイート</A> (という程の物ではないが)
<LI>
<!-- <A HREF="scripts/">Directory of donated scripts</A>-->
<A HREF="scripts/">寄贈されたスクリプトのディレクトリ</A>
<LI>
<!-- Scripts used in other projects-->
その他のプロジェクトで使用されているスクリプト
<UL>
<LI>
<A HREF="http://sourceforge.net/projects/x-symbol/">x-symbol</A>
</UL>
<LI>
<!-- <A HREF="scripting-tutorial.html">the scripting tutorial</A> -->
<A HREF="scripting-tutorial.html">スクリプト処理のチュートリアル</A>
</UL>
<H3>
<!--Example 1:-->
例 1:
</H3>
<BLOCKQUOTE>
<PRE>#<!--Set the color of all selected glyphs to be yellow--> 選択中のすべてのグリフの色を黄色に設定する。
#<!--designed to be run within an interactive fontforge session.--> FontForge の対話的なセッション中で動かすように作られている。
foreach
SetCharColor(0xffff00)
endloop
</PRE>
</BLOCKQUOTE>
<H3>
<!--Example 2:-->
例 2:
</H3>
<BLOCKQUOTE>
<PRE>#!/usr/local/bin/fontforge
<!--#This is the sfddiff script which compares two fonts --># 2つのフォントを比較する sfddiff スクリプト
if ( Strtol($version)<20060330 )
Error( <!-- "Please upgrade to a more recent version of fontforge" -->"FontForge を新しいバージョンに更新してください" )
endif
flags=0x789
outfile=""
while ( $argc > 1 && Strsub($1,0,1)=="-" )
temp = $1
if ( Strsub(temp,1,2)=='-' )
temp = Strsub(temp,1)
endif
if ( temp=="-ignorehints" )
flags = flags & ~0x8
elseif ( temp=="-ignorenames" )
flags = flags & ~0x100
elseif ( temp=="-ignoregpos" )
flags = flags & ~0x200
elseif ( temp=="-ignoregsub" )
flags = flags & ~0x400
elseif ( temp=="-ignorebitmaps" )
flags = flags & ~0x80
elseif ( temp=="-exact" )
flags = flags | 0x2
elseif ( temp=="-warn" )
flags = flags | 0x44
elseif ( temp=="-merge" )
flags = flags | 0x1800
shift
outfile = $1
elseif ( temp=="-help" )
Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] fontfile1 fontfile2" )
Print( <!-- " Compares two fontfiles" -->" 2つのフォントファイルを比較する." )
Print( <!-- " - -ignorehints: Do not compare postscript hints or truetype instructions" -->" --ignorehints: PostScript ヒントや TrueType 命令を比較しない" )
Print( <!-- " - -ignorenames: Do not compare font names" -->" --ignorenames: フォント名を比較しない" )
Print( <!-- " - -ignoregpos: Do not compare kerning, etc." -->" --ignoregpos: カーニング等の指定を比較しない" )
Print( <!-- " - -ignoregsub: Do not compare ligatures, etc." -->" --ignoregsub: 合字等の指定を比較しない" )
Print( <!-- " - -ignorebitmaps: Do not compare bitmap strikes" -->" --ignorebitmaps: ビットマップを比較しない" )
Print( <!-- " --exact: Normally sfddiff will match contours which are not exact" -->" --exact: 通常は sfddiff は厳密に同一ではないもの両者の違いが微細な" )
Print( <!-- " but where the differences are slight (so you could compare" -->" 文字列を一致した物と見なします (そのおかげで、TrueType と" )
Print( <!-- " truetype and postscript and get reasonable answers). Also" -->" PostScirpt フォントを比較してまともな答えが得られます)." )
Print( <!-- " normally sfddiff will unlink references before it compares" -->" また, sfddiff は比較を行う前に参照を展開します (それに" )
Print( <!-- " (so you can compare a postscript font (with no references)" -->" より, (参照を含まない) PostScript フォントと (参照を含む)" )
Print( <!-- " to the original source (which does have references)). Setting" -->" 元データを比較することができます). このフラグを設定した")
Print( <!-- " this flag means glyphs must match exactly." -->" 場合, グリフが一致するかどうかの判定を厳密に行います.")
Print( <!-- " --warn: Provides a warning when an exact match is not found" -->" --warn: 正確に一致しない物が無いときに, 詳しい情報を出力する" )
Print( <!-- " --merge outfile: Put any outline differences in the backgrounds of" -->" --merge outfile: アウトラインの相異点があるとき, 適切なグリフの背景に" )
Print( <!-- " appropriate glyphs" -->" 差分を書き出す" )
return(0)
elseif ( temp=="-version" )
Print( "Version 1.0" )
return(0)
else
break
endif
shift
endloop
if ( $argc!=3 || $1=="--usage" || $1=="-usage" )
Print( "sfddiff: [--version] [--help] [--usage] [--ignorehints] [--ignorenames] [--ignoregpos] [--ignoregsup] [--ignorebitmaps] [--warn] [--exact] [--merge outfile] fontfile1 fontfile2" )
return(0)
endif
Open($2)
Open($1)
CompareFonts($2,"-",flags)
if ( outfile!="" )
Save(outfile)
endif
</PRE>
</BLOCKQUOTE>
<H3>
<!--Example 3:-->
例 3:
</H3>
<BLOCKQUOTE>
<PRE>#!/usr/local/bin/fontforge
#<!--Take a Latin font and apply some simple transformations to it--> ラテン文字のフォントをとり、キリル文字の追加に先だって、
#<!--prior to adding cyrillic letters.--> いくつかの単純な変形を適用する。
#<!--can be run in a non-interactive fontforge session.--> 非対話的な FontForge のセッションからも実行可能。
Open($1);
Reencode("KOI8-R");
Select(0xa0,0xff);
//<!--Copy those things which look just like latin--> ラテン文字と同じと思われるこれらの文字をコピーする
BuildComposit();
BuildAccented();
//<!--Handle Ya which looks like a backwards "R"--> "R" を裏返しにしたように見える "Я"(Ya) を処理する
Select("R");
Copy();
Select("afii10049");
Paste();
HFlip();
CorrectDirection();
Copy();
Select(0u044f);
Paste();
CopyFgToBg();
Clear();
//<!--Gamma looks like an upside-down L--> "Г"(Gamma) は "L" を上下逆さまにしたように見える
Select("L");
Copy();
Select(0u0413);
Paste();
VFlip();
CorrectDirection();
Copy();
Select(0u0433);
Paste();
CopyFgToBg();
Clear();
//<!--Prepare for editing small caps K, etc.--> 小型大文字の "K" などの編集の準備をする
Select("K");
Copy();
Select(0u043a);
Paste();
CopyFgToBg();
Clear();
Select("H");
Copy();
Select(0u043d);
Paste();
CopyFgToBg();
Clear();
Select("T");
Copy();
Select(0u0442);
Paste();
CopyFgToBg();
Clear();
Select("B");
Copy();
Select(0u0432);
Paste();
CopyFgToBg();
Clear();
Select("M");
Copy();
Select(0u043C);
Paste();
CopyFgToBg();
Clear();
Save($1:r+"-koi8-r.sfd");
Quit(0);
</PRE>
</BLOCKQUOTE>
<H2>
<!--The <A NAME="Execute">Execute</A> Script dialog -->
「<A NAME="Execute">スクリプトを実行</A>」ダイアログ
</H2>
<P>
<!--
This dialog allows you to type a script directly in to FontForge and then
run it. Of course the most common case is that you'll have a script file
somewhere that you want to execute, so there's a button [Call] down at the
bottom of the dlg. Pressing [Call] will bring up a file picker dlg looking
for files with the extension *.pe (you can change that by typing a wildcard
sequence and pressing the [Filter] button). After you have selected your
script the appropriate text to text to invoke it will be placed in the text
area. -->
このダイアログにより、FontForge の中でスクリプトを直接打ち込んで実行することができます。
もちろん、一番多いケースは、実行したいスクリプトが既にどこかに存在する場合でしょう。そのために <CODE>[呼び出す(<U>A</U>)]</CODE> ボタンがダイアログの下についています。
<CODE>[呼び出す(<U>A</U>)]</CODE> ボタンを押すと、*.pe の拡張子を持つファイルを探すためのファイル選択ダイアログが現れます (ワイルドカードシーケンスを入力して <CODE>[フィルタ]</CODE> ボタンを押すことにより、これを変更することができます)。
スクリプトを選択すると、そのスクリプトを起動するためのコマンドがダイアログのテキストエリアに挿入されます。
<P>
<!--
The current font of the script will be set to whatever font you invoked it
from. -->
スクリプトのカレントフォントは、つねにスクリプトの呼び出し元のフォントに設定されます。
<H2>
<!-- The Scripts <A NAME="menu">Menu</A>-->
スクリプト<A NAME="menu">メニュー</A>
</H2>
<P>
<!--
You can use the preference dialog to create a list of frequently used scripts.
Invoke <A HREF="prefs.html#scripts">File->Preferences</A> and select the
Scripts tag. In this dialog are ten possible entries, each one should have
a name (to be displayed in the menu) and an associated script file to be
run. -->
頻繁に使うスクリプトのリストを、プリファレンスダイアログを用いて作成することができます。<CODE><A HREF="prefs.html#scripts">ファイル(<U>F</U>)</CODE>→<CODE>環境設定(<U>E</U>)...</A></CODE> を起動し、<CODE>[スクリプトメニュー]</CODE> タブを選択してください。このダイアログには、10 個の入力可能な項目があり、それぞれに名前 (これがメニュー内に表示されます) と、それを指定した時に実行されるスクリプトファイル名の入力欄が含まれています。
<P>
<!--
After you have set up your preferences you can invoke scripts from the font
view, either directly from the menu (File->Scripts-><your name>)
or by a hot key. The first script you added will be invoked by Cnt-Alt-1,
then second by Cnt-Alt-2, and the tenth by Cnt-Alt-0. -->
プリファレンスを設定した後、フォントビューからスクリプトを起動することができます。起動には、メニューから直接 (<CODE>ファイル(<U>F</U>)</CODE>→<CODE>スクリプトメニュー</CODE>→<CODE><I>(設定した名前)</I></CODE>) 起動するか、ホットキーを使用することができます。
最初に追加したスクリプトは Ctl-Alt-1, 2 番目は Ctl-Alt-2 で起動でき、10 番目は Ctl-Alt-0 となります。
<P>
<!--
The current font of the script will be set to whatever font you invoked it
from. -->
スクリプト内でのカレントフォントは、常に、それを呼び出したフォントにセットされます。
<P>
<P ALIGN=Center>
— <A HREF="HotKeys.html">前</A> — <A HREF="overview.html">目次</A> —
<A HREF="PfaEdit-TeX.html">次</A> —
</DIV>
</BODY></HTML>
|