| 1 |
% omchar.ch: Primitives to access the components of font metric files. |
| 2 |
% |
| 3 |
% This file is part of the Omega project, which |
| 4 |
% is based on the web2c distribution of TeX. |
| 5 |
% |
| 6 |
% Copyright (c) 1994--2000 John Plaice and Yannis Haralambous |
| 7 |
% |
| 8 |
% This library is free software; you can redistribute it and/or |
| 9 |
% modify it under the terms of the GNU Library General Public |
| 10 |
% License as published by the Free Software Foundation; either |
| 11 |
% version 2 of the License, or (at your option) any later version. |
| 12 |
% |
| 13 |
% This library is distributed in the hope that it will be useful, |
| 14 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
% Library General Public License for more details. |
| 17 |
% |
| 18 |
% You should have received a copy of the GNU Library General Public |
| 19 |
% License along with this library; if not, write to the Free Software |
| 20 |
% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 21 |
% |
| 22 |
%--------------------------------------- |
| 23 |
@x [26] m.416 l.8407 - Omega char dimensions |
| 24 |
primitive("dp",set_box_dimen,depth_offset); |
| 25 |
@!@:dp_}{\.{\\dp} primitive@> |
| 26 |
@y |
| 27 |
primitive("dp",set_box_dimen,depth_offset); |
| 28 |
@!@:dp_}{\.{\\dp} primitive@> |
| 29 |
primitive("charwd",set_box_dimen,(width_offset+3)); |
| 30 |
@!@:charwd_}{\.{\\charwd} primitive@> |
| 31 |
primitive("charht",set_box_dimen,(height_offset+3)); |
| 32 |
@!@:charht_}{\.{\\charht} primitive@> |
| 33 |
primitive("chardp",set_box_dimen,(depth_offset+3)); |
| 34 |
@!@:chardp_}{\.{\\chardp} primitive@> |
| 35 |
primitive("charit",set_box_dimen,(depth_offset+4)); |
| 36 |
@!@:charit_}{\.{\\charit} primitive@> |
| 37 |
@z |
| 38 |
%--------------------------------------- |
| 39 |
@x [26] m.416 l.8425 - Omega char dimensions |
| 40 |
set_box_dimen: if chr_code=width_offset then print_esc("wd") |
| 41 |
else if chr_code=height_offset then print_esc("ht") |
| 42 |
else print_esc("dp"); |
| 43 |
@y |
| 44 |
set_box_dimen: if chr_code=width_offset then print_esc("wd") |
| 45 |
else if chr_code=height_offset then print_esc("ht") |
| 46 |
else if chr_code=depth_offset then print_esc("dp") |
| 47 |
else if chr_code=(width_offset+3) then print_esc("charwd") |
| 48 |
else if chr_code=(height_offset+3) then print_esc("charht") |
| 49 |
else if chr_code=(depth_offset+3) then print_esc("chardp") |
| 50 |
else print_esc("charit"); |
| 51 |
@z |
| 52 |
%--------------------------------------- |
| 53 |
@x [26] m.419 l.8461 - Omega char dimensions |
| 54 |
begin scan_eight_bit_int; |
| 55 |
if box(cur_val)=null then cur_val:=0 @+else cur_val:=mem[box(cur_val)+m].sc; |
| 56 |
cur_val_level:=dimen_val; |
| 57 |
end |
| 58 |
@y |
| 59 |
if m<=3 then |
| 60 |
begin |
| 61 |
scan_eight_bit_int; |
| 62 |
if box(cur_val)=null then cur_val:=0 @+else |
| 63 |
cur_val:=mem[box(cur_val)+m].sc; |
| 64 |
cur_val_level:=dimen_val; |
| 65 |
end |
| 66 |
else |
| 67 |
begin |
| 68 |
scan_char_num; |
| 69 |
if m=(width_offset+3) then begin |
| 70 |
cur_val:= char_width(main_f)(char_info(main_f)(cur_val)) |
| 71 |
end |
| 72 |
else if m=(height_offset+3) then begin |
| 73 |
cur_val:= char_height(main_f)(height_depth(char_info(main_f)(cur_val))) |
| 74 |
end |
| 75 |
else if m=(depth_offset+3) then begin |
| 76 |
cur_val:= char_depth(main_f)(height_depth(char_info(main_f)(cur_val))) |
| 77 |
end |
| 78 |
else begin |
| 79 |
cur_val:= char_italic(main_f)(char_info(main_f)(cur_val)); |
| 80 |
end; |
| 81 |
cur_val_level:=dimen_val; |
| 82 |
end |
| 83 |
@z |
| 84 |
%--------------------------------------- |