Skip to content

Commit

Permalink
2016/05/08 23:26:52
Browse files Browse the repository at this point in the history
  • Loading branch information
MasahikoIto committed May 8, 2016
1 parent 082433d commit dff3770
Show file tree
Hide file tree
Showing 12 changed files with 288 additions and 143 deletions.
18 changes: 16 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
0.1: 2000.02.24 first release
1.0: 2003.08.11 second release
0.1: 2000.02.24 first release.
1.0: 2003.08.11 second release.
1.1: 2008.05.27 fix README typo.
add environment variable for -text option.
o PROV_ANK_POINT
o PROV_ANK_XGAP
o PROV_ANK_YGAP
o PROV_KANJI_POINT
o PROV_KANJI_XGAP
o PROV_KANJI_YGAP
add new macro for overlay.
o setXgap
o setYgap
add new parameter(x_gap, y_gap) for format definition.
you can add comment line which is started with `#' to format definition file.
add gsave at top and grestore at end of generated postscript file.
33 changes: 26 additions & 7 deletions README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
prov-1.0 -- print overlay utilities
Copyright (C) 2003 Masahiko Ito
prov-1.1 -- print overlay utilities
Copyright (C) 2008 Masahiko Ito

These programs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -16,7 +16,7 @@ along with these programs; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Mail suggestions and bug reports for these programs to
m-ito@mbox.kyoto-inet.or.jp
m-ito@myh.no-ip.org

What is prov ?
==============
Expand Down Expand Up @@ -49,6 +49,15 @@ Sample print(1)

above operation printout README(this document) overlayed
mesh.ov(mesh overlay definition) from ps-printer.
default point of ank is 12point and default point of kanji char is 12point too.
you can change default point by setting environment variable.

o PROV_ANK_POINT (default 12)
o PROV_KANJI_POINT (default 12)
o PROV_ANK_XGAP (default 0)
o PROV_ANK_YGAP (default 0)
o PROV_KANJI_XGAP (default 2)
o PROV_KANJI_YGAP (default 0)

Sample print(2)
===============
Expand Down Expand Up @@ -176,6 +185,14 @@ Overlay definition

set kanji charset.

o GAP setXgap

set x-gap between chars.

o GAP setYgap

set y-gap between chars.

o X Y (TEXT) drawText

draw text with ank charset. (X,Y) mean (left,top) of charcter.
Expand All @@ -190,23 +207,25 @@ format definition
format print layout from csv data file. each line of format definition
is defined like following.

o record_no field_no point column line
o record_no field_no point column line x_gap y_gap

record_no : set record number. usually record_no is 1, but a page is
formatted from multi record, over 2 are used too.
field_no : set field number from csv data file record.
point : set character point.
column : set print column position.
line : set print line position.
x_gap : set x gap between chars
y_gap : set y gap between chars

field separater of format definition file is TAB.

cvs data file
csv data file
=============

o field separater of cvs data file is TAB.
o field separater of csv data file is TAB.
o a field can't hold ank/kanji together.

--
Masahiko Ito <m-ito@mbox.kyoto-inet.or.jp>
Masahiko Ito <m-ito@myh.no-ip.org>
http://myh.no-ip.org/~prov/
41 changes: 33 additions & 8 deletions README.jp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
prov-1.0 -- print overlay utilities
Copyright (C) 2003 Masahiko Ito
prov-1.1 -- print overlay utilities
Copyright (C) 2005 Masahiko Ito

These programs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -16,7 +16,7 @@ along with these programs; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Mail suggestions and bug reports for these programs to
m-ito@mbox.kyoto-inet.or.jp
m-ito@myh.no-ip.org

prov�Ȥϲ���?
=============
Expand Down Expand Up @@ -49,7 +49,22 @@ prov
cat README.j | prov -text mesh.ov - | lpr -Pps-printer

�嵭�����ǡ�README.jp(����ʸ��)��mesh.ov(�ֳݤ������Х쥤)��Ťͤ�
ps-printer����������ޤ���
ps-printer����������ޤ���(������)Ⱦ��ʸ���Υǥե���Ȥ�12point��
����ʸ���Υǥե���Ȥ�12point�ˤʤ�ޤ��������Τޤް������������1ʸ��
������Ⱦ��2ʸ���������㴳û���ʤ�Τǡ�����åפ�2point����Ƥ��ޤ���

�ǥե���ȤΥݥ���ȿ�������åפϴĶ��ѿ����ѹ��Ǥ��ޤ���

o PROV_ANK_POINT (default 12)
o PROV_KANJI_POINT (default 12)
o PROV_ANK_XGAP (default 0)
o PROV_ANK_YGAP (default 0)
o PROV_KANJI_XGAP (default 2)
o PROV_KANJI_YGAP (default 0)

â�����κݤϡ�${PROVDIR}/etc/a4v.ps ��Υѥ�᡼��(SYS_Char, SYS_Line,
SYS_Xbias, SYS_Ybias, SYS_MaxWidth, SYS_MaxHeight etc...)��Ĵ����ɬ��
�ˤʤ�Ǥ��礦��

����ץ����(2)
===============
Expand Down Expand Up @@ -188,6 +203,14 @@ prov

(������)����ʸ�������ꤷ�ޤ���

o GAP setXgap

X������ʸ���ֳ֤���ꤷ�ޤ���

o GAP setYgap

Y������ʸ���ֳ֤���ꤷ�ޤ���

o X Y (TEXT) drawText

Ⱦ��ʸ����������ޤ���(X,Y) ��ʸ�����(��,��)��ؤ��ޤ���
Expand All @@ -199,25 +222,27 @@ prov
Ģɼ�ե����ޥå����
====================

cvs�����ǡ����γƥե�����ɤ�Ģɼ��Ǥ���������������ޤ���
csv�����ǡ����γƥե�����ɤ�Ģɼ��Ǥ���������������ޤ���

o �쥳�����ֹ梤�ե�������ֹ梤�ݥ���Ȣ�����ࢤ�饤��
o �쥳�����ֹ梤�ե�������ֹ梤�ݥ���Ȣ�����ࢤ�饤��X�ֳ֢�Y�ֳ�

�쥳�����ֹ� : �̾��1�򥻥åȤ��롣1�ڡ����Υ쥤�����Ȥ�ʣ����csv����
�ǡ����쥳���ɤǹ����������2�ʾ�λ����Ǥ��롣
�ե�������ֹ� : csv�����ǡ����쥳������Υե�����ɤ���ꤹ�롣1���ꥸ��
�ݥ���� : �����Υݥ���ȿ�����ꤹ�롣
����� : �������ϤΥ������֤���ꤹ�롣
�饤�� : �������ϤΥ饤����֤���ꤹ�롣
X�ֳ� : ��������ʸ���ֳ֤���ꤹ�롣
Y�ֳ� : ��������ʸ���ֳ֤���ꤹ�롣

�ƥե�����ɤΥ��ѥ졼����TAB�Ǥ��롣

cvs�����ǡ����ե�����
csv�����ǡ����ե�����
=====================

o �ƥե�����ɤΥ��ѥ졼����TAB�Ǥ��롣
o �ƥե�����ɤ�Ⱦ��ʸ��/����ʸ���κ��ߤ��Բ�ǽ�Ǥ��롣

--
Masahiko Ito <m-ito@mbox.kyoto-inet.or.jp>
Masahiko Ito <m-ito@myh.no-ip.org>
http://myh.no-ip.org/~prov/
Binary file added a4h.ps
Binary file not shown.
Binary file modified a4v.ps
Binary file not shown.
30 changes: 24 additions & 6 deletions csv2ps.awk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ BEGIN{
CSVFILE = "";
FS = "\t";
curpoint = 0;
curxgap = 0;
curygap = 0;
curchar = "";
}
{
Expand All @@ -17,25 +19,41 @@ BEGIN{
i = 1;
}
if (CSVFILE == ""){
i++;
recno[i] = $1;
field[i] = $2;
point[i] = $3;
x[i] = $4;
y[i] = $5;
if ($0 ~ /^#/){
/* do nothing */;
}else{
i++;
recno[i] = $1;
field[i] = $2;
point[i] = $3;
x[i] = $4;
y[i] = $5;
xgap[i] = $6;
if (xgap[i] == ""){
xgap[i] = 0;
}
ygap[i] = $7;
if (ygap[i] == ""){
ygap[i] = 0;
}
}
}else{
in_recno++;
for (/* do nothing */; i <= maxdef; i++){
if (in_recno == recno[i]){
if ($field[i] ~ /^\(.*\)$/){
if (curpoint != point[i] || curchar != "CHAR"){
printf("%d FONT_NORMAL setChar\n", point[i]);
printf("/SYS_drawText_Xgap %d def\n", xgap[i]);
printf("/SYS_drawText_Ygap %d def\n", ygap[i]);
curpoint = point[i];
curchar = "CHAR";
}
}else{
if (curpoint != point[i] || curchar != "KANJI"){
printf("%d KFONT_RYUMIN setKanjiChar\n", point[i]);
printf("/SYS_drawText_Xgap %d def\n", xgap[i]);
printf("/SYS_drawText_Ygap %d def\n", ygap[i]);
curpoint = point[i];
curchar = "KANJI";
}
Expand Down
101 changes: 51 additions & 50 deletions kanji/member.def
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
1 1 10 1 1
1 2 10 6 1
1 3 10 27 1
1 4 10 31 1
1 5 10 42 1
2 1 10 1 2
2 2 10 6 2
2 3 10 27 2
2 4 10 31 2
2 5 10 42 2
3 1 10 1 3
3 2 10 6 3
3 3 10 27 3
3 4 10 31 3
3 5 10 42 3
4 1 10 1 4
4 2 10 6 4
4 3 10 27 4
4 4 10 31 4
4 5 10 42 4
5 1 10 1 5
5 2 10 6 5
5 3 10 27 5
5 4 10 31 5
5 5 10 42 5
6 1 10 1 6
6 2 10 6 6
6 3 10 27 6
6 4 10 31 6
6 5 10 42 6
7 1 10 1 7
7 2 10 6 7
7 3 10 27 7
7 4 10 31 7
7 5 10 42 7
8 1 10 1 8
8 2 10 6 8
8 3 10 27 8
8 4 10 31 8
8 5 10 42 8
9 1 10 1 9
9 2 10 6 9
9 3 10 27 9
9 4 10 31 9
9 5 10 42 9
10 1 10 1 10
10 2 10 6 10
10 3 10 27 10
10 4 10 31 10
10 5 10 42 10
#Line Field Point Colmun Line Xgap Ygap
1 1 10 1 1 0 0
1 2 10 6 1 0 0
1 3 10 27 1 0 0
1 4 10 31 1 0 0
1 5 10 42 1 0 0
2 1 10 1 2 0 0
2 2 10 6 2 0 0
2 3 10 27 2 0 0
2 4 10 31 2 0 0
2 5 10 42 2 0 0
3 1 10 1 3 0 0
3 2 10 6 3 0 0
3 3 10 27 3 0 0
3 4 10 31 3 0 0
3 5 10 42 3 0 0
4 1 10 1 4 0 0
4 2 10 6 4 0 0
4 3 10 27 4 0 0
4 4 10 31 4 0 0
4 5 10 42 4 0 0
5 1 10 1 5 0 0
5 2 10 6 5 0 0
5 3 10 27 5 0 0
5 4 10 31 5 0 0
5 5 10 42 5 0 0
6 1 10 1 6 0 0
6 2 10 6 6 0 0
6 3 10 27 6 0 0
6 4 10 31 6 0 0
6 5 10 42 6 0 0
7 1 10 1 7 0 0
7 2 10 6 7 0 0
7 3 10 27 7 0 0
7 4 10 31 7 0 0
7 5 10 42 7 0 0
8 1 10 1 8 0 0
8 2 10 6 8 0 0
8 3 10 27 8 0 0
8 4 10 31 8 0 0
8 5 10 42 8 0 0
9 1 10 1 9 0 0
9 2 10 6 9 0 0
9 3 10 27 9 0 0
9 4 10 31 9 0 0
9 5 10 42 9 0 0
10 1 10 1 10 0 0
10 2 10 6 10 0 0
10 3 10 27 10 0 0
10 4 10 31 10 0 0
10 5 10 42 10 0 0
2 changes: 2 additions & 0 deletions kanji/table.ov
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
%
10 KFONT_GOTHIC setKanjiChar
% 10 FONT_NORMAL setChar
0 setXgap
0 setYgap
1 0 <�ֹ�> drawText
6 0 <��̾> drawText
27 0 <����> drawText
Expand Down
Loading

0 comments on commit dff3770

Please sign in to comment.