% convert Bitmap Distribution Format (.bdf) to Bitmap Teaching Format (.ptf)
% converts fonts for pushbroom                                 --Steve Mann

fid=fopen('font10x20dataonly.txt'); [f,count]=fscanf(fid,'%X');     
F=reshape(f,20,length(f)/20); % 10x20 font has 20 rows of numbers per char
%x=dec2bin(F(:,35)); % that's the letter A
%xt=x(:,1:10); % that's the letter A cropped to 10 bits wide which is true size
%xt'; % that's transpose
%x=dec2bin(F(:,35)); xt=fliplr(x(:,1:10)')-48
format + % use my "+" format
for n=1:97;
  eval(sprintf('x=dec2bin(F(:,%d),10); xt=fliplr(x(:,1:10)'')-48;',n));
  disp(xt)
end%for
format; format('compact'); % restore format to my usual