diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 2405e90eaf..cc29b9565b 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -60,7 +60,7 @@ class SettingsController < ApplicationController redirect_to action: 'edit', tab: params[:tab] else @options = {} - @options[:user_format] = User::USER_FORMATS.keys.map { |f| [User.current.name(f), f.to_s] } + @options[:user_format] = User::USER_FORMATS_STRUCTURE.keys.map { |f| [User.current.name(f), f.to_s] } @deliveries = ActionMailer::Base.perform_deliveries @guessed_host = request.host_with_port.dup diff --git a/app/models/user.rb b/app/models/user.rb index 0f7729fa5d..a7d40e53a8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -33,23 +33,11 @@ class User < Principal include User::Authorization USER_FORMATS_STRUCTURE = { - firstname_lastname: [:firstname, :lastname], - firstname: [:firstname], - lastname_firstname: [:lastname, :firstname], - lastname_coma_firstname: [:lastname, :firstname], - username: [:login] - } - - def self.user_format_structure_to_format(key, delimiter = ' ') - USER_FORMATS_STRUCTURE[key].map { |elem| "\#{#{elem}}" }.join(delimiter) - end - - USER_FORMATS = { - firstname_lastname: User.user_format_structure_to_format(:firstname_lastname), - firstname: User.user_format_structure_to_format(:firstname), - lastname_firstname: User.user_format_structure_to_format(:lastname_firstname), - lastname_coma_firstname: User.user_format_structure_to_format(:lastname_coma_firstname, ', '), - username: User.user_format_structure_to_format(:username) + firstname_lastname: [:firstname, :lastname], + firstname: [:firstname], + lastname_firstname: [:lastname, :firstname], + lastname_coma_firstname: [:lastname, :firstname], + username: [:login] } USER_MAIL_OPTION_ALL = ['all', :label_user_mail_option_all] @@ -294,12 +282,18 @@ class User < Principal end end - # Return user's full name for display + # Formats the user's name. def name(formatter = nil) - if formatter - eval ('"' + (User::USER_FORMATS[formatter] || User::USER_FORMATS[:firstname_lastname]) + '"') + case formatter || Setting.user_format + + when :firstname_lastname then "#{firstname} #{lastname}" + when :lastname_firstname then "#{lastname} #{firstname}" + when :lastname_coma_firstname then "#{lastname}, #{firstname}" + when :firstname then firstname + when :username then login + else - @name ||= eval ('"' + (User::USER_FORMATS[Setting.user_format] || User::USER_FORMATS[:firstname_lastname]) + '"') + "#{firstname} #{lastname}" end end diff --git a/lib/open_project/object_linking.rb b/lib/open_project/object_linking.rb index efa483be9d..c940958202 100644 --- a/lib/open_project/object_linking.rb +++ b/lib/open_project/object_linking.rb @@ -43,7 +43,7 @@ module OpenProject # Displays a link to user's account page if active or registered def link_to_user(user, options = {}) if user.is_a?(User) - name = user.name(options.delete(:format)) + name = user.name if user.active? || user.registered? || user.invited? link_to(name, user, options) else diff --git a/lib/plugins/rfpdf/lib/fonts/symbol.rb b/lib/plugins/rfpdf/lib/fonts/symbol.rb deleted file mode 100755 index c77c1fd6a0..0000000000 --- a/lib/plugins/rfpdf/lib/fonts/symbol.rb +++ /dev/null @@ -1,16 +0,0 @@ -#-- encoding: UTF-8 -TCPDFFontDescriptor.define('symbol') do |font| - font[:cw]={ - 0.chr=>250,1.chr=>250,2.chr=>250,3.chr=>250,4.chr=>250,5.chr=>250,6.chr=>250,7.chr=>250,8.chr=>250,9.chr=>250,10.chr=>250,11.chr=>250,12.chr=>250,13.chr=>250,14.chr=>250,15.chr=>250,16.chr=>250,17.chr=>250,18.chr=>250,19.chr=>250,20.chr=>250,21.chr=>250, - 22.chr=>250,23.chr=>250,24.chr=>250,25.chr=>250,26.chr=>250,27.chr=>250,28.chr=>250,29.chr=>250,30.chr=>250,31.chr=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, - ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, - 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, - 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, - 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,127.chr=>0,128.chr=>0,129.chr=>0,130.chr=>0,131.chr=>0, - 132.chr=>0,133.chr=>0,134.chr=>0,135.chr=>0,136.chr=>0,137.chr=>0,138.chr=>0,139.chr=>0,140.chr=>0,141.chr=>0,142.chr=>0,143.chr=>0,144.chr=>0,145.chr=>0,146.chr=>0,147.chr=>0,148.chr=>0,149.chr=>0,150.chr=>0,151.chr=>0,152.chr=>0,153.chr=>0, - 154.chr=>0,155.chr=>0,156.chr=>0,157.chr=>0,158.chr=>0,159.chr=>0,160.chr=>750,161.chr=>620,162.chr=>247,163.chr=>549,164.chr=>167,165.chr=>713,166.chr=>500,167.chr=>753,168.chr=>753,169.chr=>753,170.chr=>753,171.chr=>1042,172.chr=>987,173.chr=>603,174.chr=>987,175.chr=>603, - 176.chr=>400,177.chr=>549,178.chr=>411,179.chr=>549,180.chr=>549,181.chr=>713,182.chr=>494,183.chr=>460,184.chr=>549,185.chr=>549,186.chr=>549,187.chr=>549,188.chr=>1000,189.chr=>603,190.chr=>1000,191.chr=>658,192.chr=>823,193.chr=>686,194.chr=>795,195.chr=>987,196.chr=>768,197.chr=>768, - 198.chr=>823,199.chr=>768,200.chr=>768,201.chr=>713,202.chr=>713,203.chr=>713,204.chr=>713,205.chr=>713,206.chr=>713,207.chr=>713,208.chr=>768,209.chr=>713,210.chr=>790,211.chr=>790,212.chr=>890,213.chr=>823,214.chr=>549,215.chr=>250,216.chr=>713,217.chr=>603,218.chr=>603,219.chr=>1042, - 220.chr=>987,221.chr=>603,222.chr=>987,223.chr=>603,224.chr=>494,225.chr=>329,226.chr=>790,227.chr=>790,228.chr=>786,229.chr=>713,230.chr=>384,231.chr=>384,232.chr=>384,233.chr=>384,234.chr=>384,235.chr=>384,236.chr=>494,237.chr=>494,238.chr=>494,239.chr=>494,240.chr=>0,241.chr=>329, - 242.chr=>274,243.chr=>686,244.chr=>686,245.chr=>686,246.chr=>384,247.chr=>384,248.chr=>384,249.chr=>384,250.chr=>384,251.chr=>384,252.chr=>494,253.chr=>494,254.chr=>494,255.chr=>0); -end diff --git a/lib/plugins/rfpdf/lib/fonts/times.rb b/lib/plugins/rfpdf/lib/fonts/times.rb deleted file mode 100755 index 183306f21e..0000000000 --- a/lib/plugins/rfpdf/lib/fonts/times.rb +++ /dev/null @@ -1,16 +0,0 @@ -#-- encoding: UTF-8 -TCPDFFontDescriptor.define('times') do |font| - font[:cw]={ - 0.chr=>250,1.chr=>250,2.chr=>250,3.chr=>250,4.chr=>250,5.chr=>250,6.chr=>250,7.chr=>250,8.chr=>250,9.chr=>250,10.chr=>250,11.chr=>250,12.chr=>250,13.chr=>250,14.chr=>250,15.chr=>250,16.chr=>250,17.chr=>250,18.chr=>250,19.chr=>250,20.chr=>250,21.chr=>250, - 22.chr=>250,23.chr=>250,24.chr=>250,25.chr=>250,26.chr=>250,27.chr=>250,28.chr=>250,29.chr=>250,30.chr=>250,31.chr=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, - 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, - 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, - 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,127.chr=>350,128.chr=>500,129.chr=>350,130.chr=>333,131.chr=>500, - 132.chr=>444,133.chr=>1000,134.chr=>500,135.chr=>500,136.chr=>333,137.chr=>1000,138.chr=>556,139.chr=>333,140.chr=>889,141.chr=>350,142.chr=>611,143.chr=>350,144.chr=>350,145.chr=>333,146.chr=>333,147.chr=>444,148.chr=>444,149.chr=>350,150.chr=>500,151.chr=>1000,152.chr=>333,153.chr=>980, - 154.chr=>389,155.chr=>333,156.chr=>722,157.chr=>350,158.chr=>444,159.chr=>722,160.chr=>250,161.chr=>333,162.chr=>500,163.chr=>500,164.chr=>500,165.chr=>500,166.chr=>200,167.chr=>500,168.chr=>333,169.chr=>760,170.chr=>276,171.chr=>500,172.chr=>564,173.chr=>333,174.chr=>760,175.chr=>333, - 176.chr=>400,177.chr=>564,178.chr=>300,179.chr=>300,180.chr=>333,181.chr=>500,182.chr=>453,183.chr=>250,184.chr=>333,185.chr=>300,186.chr=>310,187.chr=>500,188.chr=>750,189.chr=>750,190.chr=>750,191.chr=>444,192.chr=>722,193.chr=>722,194.chr=>722,195.chr=>722,196.chr=>722,197.chr=>722, - 198.chr=>889,199.chr=>667,200.chr=>611,201.chr=>611,202.chr=>611,203.chr=>611,204.chr=>333,205.chr=>333,206.chr=>333,207.chr=>333,208.chr=>722,209.chr=>722,210.chr=>722,211.chr=>722,212.chr=>722,213.chr=>722,214.chr=>722,215.chr=>564,216.chr=>722,217.chr=>722,218.chr=>722,219.chr=>722, - 220.chr=>722,221.chr=>722,222.chr=>556,223.chr=>500,224.chr=>444,225.chr=>444,226.chr=>444,227.chr=>444,228.chr=>444,229.chr=>444,230.chr=>667,231.chr=>444,232.chr=>444,233.chr=>444,234.chr=>444,235.chr=>444,236.chr=>278,237.chr=>278,238.chr=>278,239.chr=>278,240.chr=>500,241.chr=>500, - 242.chr=>500,243.chr=>500,244.chr=>500,245.chr=>500,246.chr=>500,247.chr=>564,248.chr=>500,249.chr=>500,250.chr=>500,251.chr=>500,252.chr=>500,253.chr=>500,254.chr=>500,255.chr=>500); -end diff --git a/lib/plugins/rfpdf/lib/fonts/timesb.rb b/lib/plugins/rfpdf/lib/fonts/timesb.rb deleted file mode 100755 index 875b17c2f3..0000000000 --- a/lib/plugins/rfpdf/lib/fonts/timesb.rb +++ /dev/null @@ -1,16 +0,0 @@ -#-- encoding: UTF-8 -TCPDFFontDescriptor.define('timesb') do |font| - font[:cw]={ - 0.chr=>250,1.chr=>250,2.chr=>250,3.chr=>250,4.chr=>250,5.chr=>250,6.chr=>250,7.chr=>250,8.chr=>250,9.chr=>250,10.chr=>250,11.chr=>250,12.chr=>250,13.chr=>250,14.chr=>250,15.chr=>250,16.chr=>250,17.chr=>250,18.chr=>250,19.chr=>250,20.chr=>250,21.chr=>250, - 22.chr=>250,23.chr=>250,24.chr=>250,25.chr=>250,26.chr=>250,27.chr=>250,28.chr=>250,29.chr=>250,30.chr=>250,31.chr=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, - 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, - 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,127.chr=>350,128.chr=>500,129.chr=>350,130.chr=>333,131.chr=>500, - 132.chr=>500,133.chr=>1000,134.chr=>500,135.chr=>500,136.chr=>333,137.chr=>1000,138.chr=>556,139.chr=>333,140.chr=>1000,141.chr=>350,142.chr=>667,143.chr=>350,144.chr=>350,145.chr=>333,146.chr=>333,147.chr=>500,148.chr=>500,149.chr=>350,150.chr=>500,151.chr=>1000,152.chr=>333,153.chr=>1000, - 154.chr=>389,155.chr=>333,156.chr=>722,157.chr=>350,158.chr=>444,159.chr=>722,160.chr=>250,161.chr=>333,162.chr=>500,163.chr=>500,164.chr=>500,165.chr=>500,166.chr=>220,167.chr=>500,168.chr=>333,169.chr=>747,170.chr=>300,171.chr=>500,172.chr=>570,173.chr=>333,174.chr=>747,175.chr=>333, - 176.chr=>400,177.chr=>570,178.chr=>300,179.chr=>300,180.chr=>333,181.chr=>556,182.chr=>540,183.chr=>250,184.chr=>333,185.chr=>300,186.chr=>330,187.chr=>500,188.chr=>750,189.chr=>750,190.chr=>750,191.chr=>500,192.chr=>722,193.chr=>722,194.chr=>722,195.chr=>722,196.chr=>722,197.chr=>722, - 198.chr=>1000,199.chr=>722,200.chr=>667,201.chr=>667,202.chr=>667,203.chr=>667,204.chr=>389,205.chr=>389,206.chr=>389,207.chr=>389,208.chr=>722,209.chr=>722,210.chr=>778,211.chr=>778,212.chr=>778,213.chr=>778,214.chr=>778,215.chr=>570,216.chr=>778,217.chr=>722,218.chr=>722,219.chr=>722, - 220.chr=>722,221.chr=>722,222.chr=>611,223.chr=>556,224.chr=>500,225.chr=>500,226.chr=>500,227.chr=>500,228.chr=>500,229.chr=>500,230.chr=>722,231.chr=>444,232.chr=>444,233.chr=>444,234.chr=>444,235.chr=>444,236.chr=>278,237.chr=>278,238.chr=>278,239.chr=>278,240.chr=>500,241.chr=>556, - 242.chr=>500,243.chr=>500,244.chr=>500,245.chr=>500,246.chr=>500,247.chr=>570,248.chr=>500,249.chr=>556,250.chr=>556,251.chr=>556,252.chr=>556,253.chr=>500,254.chr=>556,255.chr=>500); -end diff --git a/lib/plugins/rfpdf/lib/fonts/timesbi.rb b/lib/plugins/rfpdf/lib/fonts/timesbi.rb deleted file mode 100755 index 9b8ea27566..0000000000 --- a/lib/plugins/rfpdf/lib/fonts/timesbi.rb +++ /dev/null @@ -1,16 +0,0 @@ -#-- encoding: UTF-8 -TCPDFFontDescriptor.define('timesbi') do |font| - font[:cw]={ - 0.chr=>250,1.chr=>250,2.chr=>250,3.chr=>250,4.chr=>250,5.chr=>250,6.chr=>250,7.chr=>250,8.chr=>250,9.chr=>250,10.chr=>250,11.chr=>250,12.chr=>250,13.chr=>250,14.chr=>250,15.chr=>250,16.chr=>250,17.chr=>250,18.chr=>250,19.chr=>250,20.chr=>250,21.chr=>250, - 22.chr=>250,23.chr=>250,24.chr=>250,25.chr=>250,26.chr=>250,27.chr=>250,28.chr=>250,29.chr=>250,30.chr=>250,31.chr=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, - 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, - 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, - 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,127.chr=>350,128.chr=>500,129.chr=>350,130.chr=>333,131.chr=>500, - 132.chr=>500,133.chr=>1000,134.chr=>500,135.chr=>500,136.chr=>333,137.chr=>1000,138.chr=>556,139.chr=>333,140.chr=>944,141.chr=>350,142.chr=>611,143.chr=>350,144.chr=>350,145.chr=>333,146.chr=>333,147.chr=>500,148.chr=>500,149.chr=>350,150.chr=>500,151.chr=>1000,152.chr=>333,153.chr=>1000, - 154.chr=>389,155.chr=>333,156.chr=>722,157.chr=>350,158.chr=>389,159.chr=>611,160.chr=>250,161.chr=>389,162.chr=>500,163.chr=>500,164.chr=>500,165.chr=>500,166.chr=>220,167.chr=>500,168.chr=>333,169.chr=>747,170.chr=>266,171.chr=>500,172.chr=>606,173.chr=>333,174.chr=>747,175.chr=>333, - 176.chr=>400,177.chr=>570,178.chr=>300,179.chr=>300,180.chr=>333,181.chr=>576,182.chr=>500,183.chr=>250,184.chr=>333,185.chr=>300,186.chr=>300,187.chr=>500,188.chr=>750,189.chr=>750,190.chr=>750,191.chr=>500,192.chr=>667,193.chr=>667,194.chr=>667,195.chr=>667,196.chr=>667,197.chr=>667, - 198.chr=>944,199.chr=>667,200.chr=>667,201.chr=>667,202.chr=>667,203.chr=>667,204.chr=>389,205.chr=>389,206.chr=>389,207.chr=>389,208.chr=>722,209.chr=>722,210.chr=>722,211.chr=>722,212.chr=>722,213.chr=>722,214.chr=>722,215.chr=>570,216.chr=>722,217.chr=>722,218.chr=>722,219.chr=>722, - 220.chr=>722,221.chr=>611,222.chr=>611,223.chr=>500,224.chr=>500,225.chr=>500,226.chr=>500,227.chr=>500,228.chr=>500,229.chr=>500,230.chr=>722,231.chr=>444,232.chr=>444,233.chr=>444,234.chr=>444,235.chr=>444,236.chr=>278,237.chr=>278,238.chr=>278,239.chr=>278,240.chr=>500,241.chr=>556, - 242.chr=>500,243.chr=>500,244.chr=>500,245.chr=>500,246.chr=>500,247.chr=>570,248.chr=>500,249.chr=>556,250.chr=>556,251.chr=>556,252.chr=>556,253.chr=>444,254.chr=>500,255.chr=>444); -end diff --git a/lib/plugins/rfpdf/lib/fonts/timesi.rb b/lib/plugins/rfpdf/lib/fonts/timesi.rb deleted file mode 100755 index 845398e8d4..0000000000 --- a/lib/plugins/rfpdf/lib/fonts/timesi.rb +++ /dev/null @@ -1,16 +0,0 @@ -#-- encoding: UTF-8 -TCPDFFontDescriptor.define('timesi') do |font| - font[:cw]={ - 0.chr=>250,1.chr=>250,2.chr=>250,3.chr=>250,4.chr=>250,5.chr=>250,6.chr=>250,7.chr=>250,8.chr=>250,9.chr=>250,10.chr=>250,11.chr=>250,12.chr=>250,13.chr=>250,14.chr=>250,15.chr=>250,16.chr=>250,17.chr=>250,18.chr=>250,19.chr=>250,20.chr=>250,21.chr=>250, - 22.chr=>250,23.chr=>250,24.chr=>250,25.chr=>250,26.chr=>250,27.chr=>250,28.chr=>250,29.chr=>250,30.chr=>250,31.chr=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, - 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, - 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, - 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,127.chr=>350,128.chr=>500,129.chr=>350,130.chr=>333,131.chr=>500, - 132.chr=>556,133.chr=>889,134.chr=>500,135.chr=>500,136.chr=>333,137.chr=>1000,138.chr=>500,139.chr=>333,140.chr=>944,141.chr=>350,142.chr=>556,143.chr=>350,144.chr=>350,145.chr=>333,146.chr=>333,147.chr=>556,148.chr=>556,149.chr=>350,150.chr=>500,151.chr=>889,152.chr=>333,153.chr=>980, - 154.chr=>389,155.chr=>333,156.chr=>667,157.chr=>350,158.chr=>389,159.chr=>556,160.chr=>250,161.chr=>389,162.chr=>500,163.chr=>500,164.chr=>500,165.chr=>500,166.chr=>275,167.chr=>500,168.chr=>333,169.chr=>760,170.chr=>276,171.chr=>500,172.chr=>675,173.chr=>333,174.chr=>760,175.chr=>333, - 176.chr=>400,177.chr=>675,178.chr=>300,179.chr=>300,180.chr=>333,181.chr=>500,182.chr=>523,183.chr=>250,184.chr=>333,185.chr=>300,186.chr=>310,187.chr=>500,188.chr=>750,189.chr=>750,190.chr=>750,191.chr=>500,192.chr=>611,193.chr=>611,194.chr=>611,195.chr=>611,196.chr=>611,197.chr=>611, - 198.chr=>889,199.chr=>667,200.chr=>611,201.chr=>611,202.chr=>611,203.chr=>611,204.chr=>333,205.chr=>333,206.chr=>333,207.chr=>333,208.chr=>722,209.chr=>667,210.chr=>722,211.chr=>722,212.chr=>722,213.chr=>722,214.chr=>722,215.chr=>675,216.chr=>722,217.chr=>722,218.chr=>722,219.chr=>722, - 220.chr=>722,221.chr=>556,222.chr=>611,223.chr=>500,224.chr=>500,225.chr=>500,226.chr=>500,227.chr=>500,228.chr=>500,229.chr=>500,230.chr=>667,231.chr=>444,232.chr=>444,233.chr=>444,234.chr=>444,235.chr=>444,236.chr=>278,237.chr=>278,238.chr=>278,239.chr=>278,240.chr=>500,241.chr=>500, - 242.chr=>500,243.chr=>500,244.chr=>500,245.chr=>500,246.chr=>500,247.chr=>675,248.chr=>500,249.chr=>500,250.chr=>500,251.chr=>500,252.chr=>500,253.chr=>444,254.chr=>500,255.chr=>444); -end diff --git a/lib/plugins/rfpdf/lib/fonts/zapfdingbats.rb b/lib/plugins/rfpdf/lib/fonts/zapfdingbats.rb deleted file mode 100755 index 0f6fb52128..0000000000 --- a/lib/plugins/rfpdf/lib/fonts/zapfdingbats.rb +++ /dev/null @@ -1,16 +0,0 @@ -#-- encoding: UTF-8 -TCPDFFontDescriptor.define('zapfdingbats') do |font| - font[:cw]={ - 0.chr=>0,1.chr=>0,2.chr=>0,3.chr=>0,4.chr=>0,5.chr=>0,6.chr=>0,7.chr=>0,8.chr=>0,9.chr=>0,10.chr=>0,11.chr=>0,12.chr=>0,13.chr=>0,14.chr=>0,15.chr=>0,16.chr=>0,17.chr=>0,18.chr=>0,19.chr=>0,20.chr=>0,21.chr=>0, - 22.chr=>0,23.chr=>0,24.chr=>0,25.chr=>0,26.chr=>0,27.chr=>0,28.chr=>0,29.chr=>0,30.chr=>0,31.chr=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, - ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, - 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, - 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, - 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,127.chr=>0,128.chr=>390,129.chr=>390,130.chr=>317,131.chr=>317, - 132.chr=>276,133.chr=>276,134.chr=>509,135.chr=>509,136.chr=>410,137.chr=>410,138.chr=>234,139.chr=>234,140.chr=>334,141.chr=>334,142.chr=>0,143.chr=>0,144.chr=>0,145.chr=>0,146.chr=>0,147.chr=>0,148.chr=>0,149.chr=>0,150.chr=>0,151.chr=>0,152.chr=>0,153.chr=>0, - 154.chr=>0,155.chr=>0,156.chr=>0,157.chr=>0,158.chr=>0,159.chr=>0,160.chr=>0,161.chr=>732,162.chr=>544,163.chr=>544,164.chr=>910,165.chr=>667,166.chr=>760,167.chr=>760,168.chr=>776,169.chr=>595,170.chr=>694,171.chr=>626,172.chr=>788,173.chr=>788,174.chr=>788,175.chr=>788, - 176.chr=>788,177.chr=>788,178.chr=>788,179.chr=>788,180.chr=>788,181.chr=>788,182.chr=>788,183.chr=>788,184.chr=>788,185.chr=>788,186.chr=>788,187.chr=>788,188.chr=>788,189.chr=>788,190.chr=>788,191.chr=>788,192.chr=>788,193.chr=>788,194.chr=>788,195.chr=>788,196.chr=>788,197.chr=>788, - 198.chr=>788,199.chr=>788,200.chr=>788,201.chr=>788,202.chr=>788,203.chr=>788,204.chr=>788,205.chr=>788,206.chr=>788,207.chr=>788,208.chr=>788,209.chr=>788,210.chr=>788,211.chr=>788,212.chr=>894,213.chr=>838,214.chr=>1016,215.chr=>458,216.chr=>748,217.chr=>924,218.chr=>748,219.chr=>918, - 220.chr=>927,221.chr=>928,222.chr=>928,223.chr=>834,224.chr=>873,225.chr=>828,226.chr=>924,227.chr=>924,228.chr=>917,229.chr=>930,230.chr=>931,231.chr=>463,232.chr=>883,233.chr=>836,234.chr=>836,235.chr=>867,236.chr=>867,237.chr=>696,238.chr=>696,239.chr=>874,240.chr=>0,241.chr=>874, - 242.chr=>760,243.chr=>946,244.chr=>771,245.chr=>865,246.chr=>771,247.chr=>888,248.chr=>967,249.chr=>888,250.chr=>831,251.chr=>873,252.chr=>927,253.chr=>970,254.chr=>918,255.chr=>0); -end diff --git a/lib/plugins/rfpdf/lib/fpdf/makefont.rb b/lib/plugins/rfpdf/lib/fpdf/makefont.rb deleted file mode 100644 index ba7f70c7a7..0000000000 --- a/lib/plugins/rfpdf/lib/fpdf/makefont.rb +++ /dev/null @@ -1,1788 +0,0 @@ -#!/usr/bin/env ruby -#-- encoding: UTF-8 -# -# Utility to generate font definition files -# Version: 1.1 -# Date: 2006-07-19 -# -# Changelog: -# Version 1.1 - Brian Ollenberger -# - Fixed a very small bug in MakeFont for generating FontDef.diff. - -Charencodings = { -# Central Europe - 'cp1250' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', '.notdef', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - '.notdef', 'perthousand', 'Scaron', 'guilsinglleft', - 'Sacute', 'Tcaron', 'Zcaron', 'Zacute', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - '.notdef', 'trademark', 'scaron', 'guilsinglright', - 'sacute', 'tcaron', 'zcaron', 'zacute', - 'space', 'caron', 'breve', 'Lslash', - 'currency', 'Aogonek', 'brokenbar', 'section', - 'dieresis', 'copyright', 'Scedilla', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'Zdotaccent', - 'degree', 'plusminus', 'ogonek', 'lslash', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'cedilla', 'aogonek', 'scedilla', 'guillemotright', - 'Lcaron', 'hungarumlaut', 'lcaron', 'zdotaccent', - 'Racute', 'Aacute', 'Acircumflex', 'Abreve', - 'Adieresis', 'Lacute', 'Cacute', 'Ccedilla', - 'Ccaron', 'Eacute', 'Eogonek', 'Edieresis', - 'Ecaron', 'Iacute', 'Icircumflex', 'Dcaron', - 'Dcroat', 'Nacute', 'Ncaron', 'Oacute', - 'Ocircumflex', 'Ohungarumlaut', 'Odieresis', 'multiply', - 'Rcaron', 'Uring', 'Uacute', 'Uhungarumlaut', - 'Udieresis', 'Yacute', 'Tcommaaccent', 'germandbls', - 'racute', 'aacute', 'acircumflex', 'abreve', - 'adieresis', 'lacute', 'cacute', 'ccedilla', - 'ccaron', 'eacute', 'eogonek', 'edieresis', - 'ecaron', 'iacute', 'icircumflex', 'dcaron', - 'dcroat', 'nacute', 'ncaron', 'oacute', - 'ocircumflex', 'ohungarumlaut', 'odieresis', 'divide', - 'rcaron', 'uring', 'uacute', 'uhungarumlaut', - 'udieresis', 'yacute', 'tcommaaccent', 'dotaccent' - ], -# Cyrillic - 'cp1251' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'afii10051', 'afii10052', 'quotesinglbase', 'afii10100', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - 'Euro', 'perthousand', 'afii10058', 'guilsinglleft', - 'afii10059', 'afii10061', 'afii10060', 'afii10145', - 'afii10099', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - '.notdef', 'trademark', 'afii10106', 'guilsinglright', - 'afii10107', 'afii10109', 'afii10108', 'afii10193', - 'space', 'afii10062', 'afii10110', 'afii10057', - 'currency', 'afii10050', 'brokenbar', 'section', - 'afii10023', 'copyright', 'afii10053', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'afii10056', - 'degree', 'plusminus', 'afii10055', 'afii10103', - 'afii10098', 'mu', 'paragraph', 'periodcentered', - 'afii10071', 'afii61352', 'afii10101', 'guillemotright', - 'afii10105', 'afii10054', 'afii10102', 'afii10104', - 'afii10017', 'afii10018', 'afii10019', 'afii10020', - 'afii10021', 'afii10022', 'afii10024', 'afii10025', - 'afii10026', 'afii10027', 'afii10028', 'afii10029', - 'afii10030', 'afii10031', 'afii10032', 'afii10033', - 'afii10034', 'afii10035', 'afii10036', 'afii10037', - 'afii10038', 'afii10039', 'afii10040', 'afii10041', - 'afii10042', 'afii10043', 'afii10044', 'afii10045', - 'afii10046', 'afii10047', 'afii10048', 'afii10049', - 'afii10065', 'afii10066', 'afii10067', 'afii10068', - 'afii10069', 'afii10070', 'afii10072', 'afii10073', - 'afii10074', 'afii10075', 'afii10076', 'afii10077', - 'afii10078', 'afii10079', 'afii10080', 'afii10081', - 'afii10082', 'afii10083', 'afii10084', 'afii10085', - 'afii10086', 'afii10087', 'afii10088', 'afii10089', - 'afii10090', 'afii10091', 'afii10092', 'afii10093', - 'afii10094', 'afii10095', 'afii10096', 'afii10097' - ], -# Western Europe - 'cp1252' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', 'florin', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - 'circumflex', 'perthousand', 'Scaron', 'guilsinglleft', - 'OE', '.notdef', 'Zcaron', '.notdef', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - 'tilde', 'trademark', 'scaron', 'guilsinglright', - 'oe', '.notdef', 'zcaron', 'Ydieresis', - 'space', 'exclamdown', 'cent', 'sterling', - 'currency', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'questiondown', - 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', - 'Adieresis', 'Aring', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', - 'Eth', 'Ntilde', 'Ograve', 'Oacute', - 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', - 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Yacute', 'Thorn', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'atilde', - 'adieresis', 'aring', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'igrave', 'iacute', 'icircumflex', 'idieresis', - 'eth', 'ntilde', 'ograve', 'oacute', - 'ocircumflex', 'otilde', 'odieresis', 'divide', - 'oslash', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'yacute', 'thorn', 'ydieresis' - ], -# Greek - 'cp1253' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', 'florin', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - '.notdef', 'perthousand', '.notdef', 'guilsinglleft', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - '.notdef', 'trademark', '.notdef', 'guilsinglright', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'dieresistonos', 'Alphatonos', 'sterling', - 'currency', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', '.notdef', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'afii00208', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'tonos', 'mu', 'paragraph', 'periodcentered', - 'Epsilontonos', 'Etatonos', 'Iotatonos', 'guillemotright', - 'Omicrontonos', 'onehalf', 'Upsilontonos', 'Omegatonos', - 'iotadieresistonos','Alpha', 'Beta', 'Gamma', - 'Delta', 'Epsilon', 'Zeta', 'Eta', - 'Theta', 'Iota', 'Kappa', 'Lambda', - 'Mu', 'Nu', 'Xi', 'Omicron', - 'Pi', 'Rho', '.notdef', 'Sigma', - 'Tau', 'Upsilon', 'Phi', 'Chi', - 'Psi', 'Omega', 'Iotadieresis', 'Upsilondieresis', - 'alphatonos', 'epsilontonos', 'etatonos', 'iotatonos', - 'upsilondieresistonos','alpha', 'beta', 'gamma', - 'delta', 'epsilon', 'zeta', 'eta', - 'theta', 'iota', 'kappa', 'lambda', - 'mu', 'nu', 'xi', 'omicron', - 'pi', 'rho', 'sigma1', 'sigma', - 'tau', 'upsilon', 'phi', 'chi', - 'psi', 'omega', 'iotadieresis', 'upsilondieresis', - 'omicrontonos', 'upsilontonos', 'omegatonos', '.notdef' - ], -# Turkish - 'cp1254' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', 'florin', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - 'circumflex', 'perthousand', 'Scaron', 'guilsinglleft', - 'OE', '.notdef', '.notdef', '.notdef', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - 'tilde', 'trademark', 'scaron', 'guilsinglright', - 'oe', '.notdef', '.notdef', 'Ydieresis', - 'space', 'exclamdown', 'cent', 'sterling', - 'currency', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'questiondown', - 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', - 'Adieresis', 'Aring', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', - 'Gbreve', 'Ntilde', 'Ograve', 'Oacute', - 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', - 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Idotaccent', 'Scedilla', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'atilde', - 'adieresis', 'aring', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'igrave', 'iacute', 'icircumflex', 'idieresis', - 'gbreve', 'ntilde', 'ograve', 'oacute', - 'ocircumflex', 'otilde', 'odieresis', 'divide', - 'oslash', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'dotlessi', 'scedilla', 'ydieresis' - ], -# Hebrew - 'cp1255' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', 'florin', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - 'circumflex', 'perthousand', '.notdef', 'guilsinglleft', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - 'tilde', 'trademark', '.notdef', 'guilsinglright', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclamdown', 'cent', 'sterling', - 'afii57636', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', 'multiply', 'guillemotleft', - 'logicalnot', 'sfthyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'middot', - 'cedilla', 'onesuperior', 'divide', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'questiondown', - 'afii57799', 'afii57801', 'afii57800', 'afii57802', - 'afii57793', 'afii57794', 'afii57795', 'afii57798', - 'afii57797', 'afii57806', '.notdef', 'afii57796', - 'afii57807', 'afii57839', 'afii57645', 'afii57841', - 'afii57842', 'afii57804', 'afii57803', 'afii57658', - 'afii57716', 'afii57717', 'afii57718', 'gereshhebrew', - 'gershayimhebrew','.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'afii57664', 'afii57665', 'afii57666', 'afii57667', - 'afii57668', 'afii57669', 'afii57670', 'afii57671', - 'afii57672', 'afii57673', 'afii57674', 'afii57675', - 'afii57676', 'afii57677', 'afii57678', 'afii57679', - 'afii57680', 'afii57681', 'afii57682', 'afii57683', - 'afii57684', 'afii57685', 'afii57686', 'afii57687', - 'afii57688', 'afii57689', 'afii57690', '.notdef', - '.notdef', 'afii299', 'afii300', '.notdef' - ], -# Baltic - 'cp1257' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', '.notdef', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - '.notdef', 'perthousand', '.notdef', 'guilsinglleft', - '.notdef', 'dieresis', 'caron', 'cedilla', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - '.notdef', 'trademark', '.notdef', 'guilsinglright', - '.notdef', 'macron', 'ogonek', '.notdef', - 'space', '.notdef', 'cent', 'sterling', - 'currency', '.notdef', 'brokenbar', 'section', - 'Oslash', 'copyright', 'Rcommaaccent', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'AE', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'oslash', 'onesuperior', 'rcommaaccent', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'ae', - 'Aogonek', 'Iogonek', 'Amacron', 'Cacute', - 'Adieresis', 'Aring', 'Eogonek', 'Emacron', - 'Ccaron', 'Eacute', 'Zacute', 'Edotaccent', - 'Gcommaaccent', 'Kcommaaccent', 'Imacron', 'Lcommaaccent', - 'Scaron', 'Nacute', 'Ncommaaccent', 'Oacute', - 'Omacron', 'Otilde', 'Odieresis', 'multiply', - 'Uogonek', 'Lslash', 'Sacute', 'Umacron', - 'Udieresis', 'Zdotaccent', 'Zcaron', 'germandbls', - 'aogonek', 'iogonek', 'amacron', 'cacute', - 'adieresis', 'aring', 'eogonek', 'emacron', - 'ccaron', 'eacute', 'zacute', 'edotaccent', - 'gcommaaccent', 'kcommaaccent', 'imacron', 'lcommaaccent', - 'scaron', 'nacute', 'ncommaaccent', 'oacute', - 'omacron', 'otilde', 'odieresis', 'divide', - 'uogonek', 'lslash', 'sacute', 'umacron', - 'udieresis', 'zdotaccent', 'zcaron', 'dotaccent' - ], -# Vietnamese - 'cp1258' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', 'quotesinglbase', 'florin', - 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', - 'circumflex', 'perthousand', '.notdef', 'guilsinglleft', - 'OE', '.notdef', '.notdef', '.notdef', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - 'tilde', 'trademark', '.notdef', 'guilsinglright', - 'oe', '.notdef', '.notdef', 'Ydieresis', - 'space', 'exclamdown', 'cent', 'sterling', - 'currency', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'questiondown', - 'Agrave', 'Aacute', 'Acircumflex', 'Abreve', - 'Adieresis', 'Aring', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'gravecomb', 'Iacute', 'Icircumflex', 'Idieresis', - 'Dcroat', 'Ntilde', 'hookabovecomb', 'Oacute', - 'Ocircumflex', 'Ohorn', 'Odieresis', 'multiply', - 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Uhorn', 'tildecomb', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'abreve', - 'adieresis', 'aring', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'acutecomb', 'iacute', 'icircumflex', 'idieresis', - 'dcroat', 'ntilde', 'dotbelowcomb', 'oacute', - 'ocircumflex', 'ohorn', 'odieresis', 'divide', - 'oslash', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'uhorn', 'dong', 'ydieresis' - ], -# Thai - 'cp874' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'Euro', '.notdef', '.notdef', '.notdef', - '.notdef', 'ellipsis', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', 'quoteleft', 'quoteright', 'quotedblleft', - 'quotedblright', 'bullet', 'endash', 'emdash', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'kokaithai', 'khokhaithai', 'khokhuatthai', - 'khokhwaithai', 'khokhonthai', 'khorakhangthai', 'ngonguthai', - 'chochanthai', 'chochingthai', 'chochangthai', 'sosothai', - 'chochoethai', 'yoyingthai', 'dochadathai', 'topatakthai', - 'thothanthai', 'thonangmonthothai', 'thophuthaothai', 'nonenthai', - 'dodekthai', 'totaothai', 'thothungthai', 'thothahanthai', - 'thothongthai', 'nonuthai', 'bobaimaithai', 'poplathai', - 'phophungthai', 'fofathai', 'phophanthai', 'fofanthai', - 'phosamphaothai', 'momathai', 'yoyakthai', 'roruathai', - 'ruthai', 'lolingthai', 'luthai', 'wowaenthai', - 'sosalathai', 'sorusithai', 'sosuathai', 'hohipthai', - 'lochulathai', 'oangthai', 'honokhukthai', 'paiyannoithai', - 'saraathai', 'maihanakatthai', 'saraaathai', 'saraamthai', - 'saraithai', 'saraiithai', 'sarauethai', 'saraueethai', - 'sarauthai', 'sarauuthai', 'phinthuthai', '.notdef', - '.notdef', '.notdef', '.notdef', 'bahtthai', - 'saraethai', 'saraaethai', 'saraothai', 'saraaimaimuanthai', - 'saraaimaimalaithai', 'lakkhangyaothai', 'maiyamokthai', 'maitaikhuthai', - 'maiekthai', 'maithothai', 'maitrithai', 'maichattawathai', - 'thanthakhatthai', 'nikhahitthai', 'yamakkanthai', 'fongmanthai', - 'zerothai', 'onethai', 'twothai', 'threethai', - 'fourthai', 'fivethai', 'sixthai', 'seventhai', - 'eightthai', 'ninethai', 'angkhankhuthai', 'khomutthai', - '.notdef', '.notdef', '.notdef', '.notdef' - ], -# Western Europe - 'ISO-8859-1' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclamdown', 'cent', 'sterling', - 'currency', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'questiondown', - 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', - 'Adieresis', 'Aring', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', - 'Eth', 'Ntilde', 'Ograve', 'Oacute', - 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', - 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Yacute', 'Thorn', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'atilde', - 'adieresis', 'aring', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'igrave', 'iacute', 'icircumflex', 'idieresis', - 'eth', 'ntilde', 'ograve', 'oacute', - 'ocircumflex', 'otilde', 'odieresis', 'divide', - 'oslash', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'yacute', 'thorn', 'ydieresis' - ], -# Central Europe - 'ISO-8859-2' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'Aogonek', 'breve', 'Lslash', - 'currency', 'Lcaron', 'Sacute', 'section', - 'dieresis', 'Scaron', 'Scedilla', 'Tcaron', - 'Zacute', 'hyphen', 'Zcaron', 'Zdotaccent', - 'degree', 'aogonek', 'ogonek', 'lslash', - 'acute', 'lcaron', 'sacute', 'caron', - 'cedilla', 'scaron', 'scedilla', 'tcaron', - 'zacute', 'hungarumlaut', 'zcaron', 'zdotaccent', - 'Racute', 'Aacute', 'Acircumflex', 'Abreve', - 'Adieresis', 'Lacute', 'Cacute', 'Ccedilla', - 'Ccaron', 'Eacute', 'Eogonek', 'Edieresis', - 'Ecaron', 'Iacute', 'Icircumflex', 'Dcaron', - 'Dcroat', 'Nacute', 'Ncaron', 'Oacute', - 'Ocircumflex', 'Ohungarumlaut', 'Odieresis', 'multiply', - 'Rcaron', 'Uring', 'Uacute', 'Uhungarumlaut', - 'Udieresis', 'Yacute', 'Tcommaaccent', 'germandbls', - 'racute', 'aacute', 'acircumflex', 'abreve', - 'adieresis', 'lacute', 'cacute', 'ccedilla', - 'ccaron', 'eacute', 'eogonek', 'edieresis', - 'ecaron', 'iacute', 'icircumflex', 'dcaron', - 'dcroat', 'nacute', 'ncaron', 'oacute', - 'ocircumflex', 'ohungarumlaut', 'odieresis', 'divide', - 'rcaron', 'uring', 'uacute', 'uhungarumlaut', - 'udieresis', 'yacute', 'tcommaaccent', 'dotaccent' - ], -# Baltic - 'ISO-8859-4' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'Aogonek', 'kgreenlandic', 'Rcommaaccent', - 'currency', 'Itilde', 'Lcommaaccent', 'section', - 'dieresis', 'Scaron', 'Emacron', 'Gcommaaccent', - 'Tbar', 'hyphen', 'Zcaron', 'macron', - 'degree', 'aogonek', 'ogonek', 'rcommaaccent', - 'acute', 'itilde', 'lcommaaccent', 'caron', - 'cedilla', 'scaron', 'emacron', 'gcommaaccent', - 'tbar', 'Eng', 'zcaron', 'eng', - 'Amacron', 'Aacute', 'Acircumflex', 'Atilde', - 'Adieresis', 'Aring', 'AE', 'Iogonek', - 'Ccaron', 'Eacute', 'Eogonek', 'Edieresis', - 'Edotaccent', 'Iacute', 'Icircumflex', 'Imacron', - 'Dcroat', 'Ncommaaccent', 'Omacron', 'Kcommaaccent', - 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', - 'Oslash', 'Uogonek', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Utilde', 'Umacron', 'germandbls', - 'amacron', 'aacute', 'acircumflex', 'atilde', - 'adieresis', 'aring', 'ae', 'iogonek', - 'ccaron', 'eacute', 'eogonek', 'edieresis', - 'edotaccent', 'iacute', 'icircumflex', 'imacron', - 'dcroat', 'ncommaaccent', 'omacron', 'kcommaaccent', - 'ocircumflex', 'otilde', 'odieresis', 'divide', - 'oslash', 'uogonek', 'uacute', 'ucircumflex', - 'udieresis', 'utilde', 'umacron', 'dotaccent' - ], -# Cyrillic - 'ISO-8859-5' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'afii10023', 'afii10051', 'afii10052', - 'afii10053', 'afii10054', 'afii10055', 'afii10056', - 'afii10057', 'afii10058', 'afii10059', 'afii10060', - 'afii10061', 'hyphen', 'afii10062', 'afii10145', - 'afii10017', 'afii10018', 'afii10019', 'afii10020', - 'afii10021', 'afii10022', 'afii10024', 'afii10025', - 'afii10026', 'afii10027', 'afii10028', 'afii10029', - 'afii10030', 'afii10031', 'afii10032', 'afii10033', - 'afii10034', 'afii10035', 'afii10036', 'afii10037', - 'afii10038', 'afii10039', 'afii10040', 'afii10041', - 'afii10042', 'afii10043', 'afii10044', 'afii10045', - 'afii10046', 'afii10047', 'afii10048', 'afii10049', - 'afii10065', 'afii10066', 'afii10067', 'afii10068', - 'afii10069', 'afii10070', 'afii10072', 'afii10073', - 'afii10074', 'afii10075', 'afii10076', 'afii10077', - 'afii10078', 'afii10079', 'afii10080', 'afii10081', - 'afii10082', 'afii10083', 'afii10084', 'afii10085', - 'afii10086', 'afii10087', 'afii10088', 'afii10089', - 'afii10090', 'afii10091', 'afii10092', 'afii10093', - 'afii10094', 'afii10095', 'afii10096', 'afii10097', - 'afii61352', 'afii10071', 'afii10099', 'afii10100', - 'afii10101', 'afii10102', 'afii10103', 'afii10104', - 'afii10105', 'afii10106', 'afii10107', 'afii10108', - 'afii10109', 'section', 'afii10110', 'afii10193' - ], -# Greek - 'ISO-8859-7' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'quoteleft', 'quoteright', 'sterling', - '.notdef', '.notdef', 'brokenbar', 'section', - 'dieresis', 'copyright', '.notdef', 'guillemotleft', - 'logicalnot', 'hyphen', '.notdef', 'afii00208', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'tonos', 'dieresistonos', 'Alphatonos', 'periodcentered', - 'Epsilontonos', 'Etatonos', 'Iotatonos', 'guillemotright', - 'Omicrontonos', 'onehalf', 'Upsilontonos', 'Omegatonos', - 'iotadieresistonos','Alpha', 'Beta', 'Gamma', - 'Delta', 'Epsilon', 'Zeta', 'Eta', - 'Theta', 'Iota', 'Kappa', 'Lambda', - 'Mu', 'Nu', 'Xi', 'Omicron', - 'Pi', 'Rho', '.notdef', 'Sigma', - 'Tau', 'Upsilon', 'Phi', 'Chi', - 'Psi', 'Omega', 'Iotadieresis', 'Upsilondieresis', - 'alphatonos', 'epsilontonos', 'etatonos', 'iotatonos', - 'upsilondieresistonos','alpha', 'beta', 'gamma', - 'delta', 'epsilon', 'zeta', 'eta', - 'theta', 'iota', 'kappa', 'lambda', - 'mu', 'nu', 'xi', 'omicron', - 'pi', 'rho', 'sigma1', 'sigma', - 'tau', 'upsilon', 'phi', 'chi', - 'psi', 'omega', 'iotadieresis', 'upsilondieresis', - 'omicrontonos', 'upsilontonos', 'omegatonos', '.notdef' - ], -# Turkish - 'ISO-8859-9' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclamdown', 'cent', 'sterling', - 'currency', 'yen', 'brokenbar', 'section', - 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'acute', 'mu', 'paragraph', 'periodcentered', - 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', - 'onequarter', 'onehalf', 'threequarters', 'questiondown', - 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', - 'Adieresis', 'Aring', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', - 'Gbreve', 'Ntilde', 'Ograve', 'Oacute', - 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', - 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Idotaccent', 'Scedilla', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'atilde', - 'adieresis', 'aring', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'igrave', 'iacute', 'icircumflex', 'idieresis', - 'gbreve', 'ntilde', 'ograve', 'oacute', - 'ocircumflex', 'otilde', 'odieresis', 'divide', - 'oslash', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'dotlessi', 'scedilla', 'ydieresis' - ], -# Thai - 'ISO-8859-11' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'kokaithai', 'khokhaithai', 'khokhuatthai', - 'khokhwaithai', 'khokhonthai', 'khorakhangthai', 'ngonguthai', - 'chochanthai', 'chochingthai', 'chochangthai', 'sosothai', - 'chochoethai', 'yoyingthai', 'dochadathai', 'topatakthai', - 'thothanthai', 'thonangmonthothai','thophuthaothai', 'nonenthai', - 'dodekthai', 'totaothai', 'thothungthai', 'thothahanthai', - 'thothongthai', 'nonuthai', 'bobaimaithai', 'poplathai', - 'phophungthai', 'fofathai', 'phophanthai', 'fofanthai', - 'phosamphaothai', 'momathai', 'yoyakthai', 'roruathai', - 'ruthai', 'lolingthai', 'luthai', 'wowaenthai', - 'sosalathai', 'sorusithai', 'sosuathai', 'hohipthai', - 'lochulathai', 'oangthai', 'honokhukthai', 'paiyannoithai', - 'saraathai', 'maihanakatthai', 'saraaathai', 'saraamthai', - 'saraithai', 'saraiithai', 'sarauethai', 'saraueethai', - 'sarauthai', 'sarauuthai', 'phinthuthai', '.notdef', - '.notdef', '.notdef', '.notdef', 'bahtthai', - 'saraethai', 'saraaethai', 'saraothai', 'saraaimaimuanthai', - 'saraaimaimalaithai','lakkhangyaothai','maiyamokthai', 'maitaikhuthai', - 'maiekthai', 'maithothai', 'maitrithai', 'maichattawathai', - 'thanthakhatthai','nikhahitthai', 'yamakkanthai', 'fongmanthai', - 'zerothai', 'onethai', 'twothai', 'threethai', - 'fourthai', 'fivethai', 'sixthai', 'seventhai', - 'eightthai', 'ninethai', 'angkhankhuthai', 'khomutthai', - '.notdef', '.notdef', '.notdef', '.notdef' - ], -# Western Europe - 'ISO-8859-15' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclamdown', 'cent', 'sterling', - 'Euro', 'yen', 'Scaron', 'section', - 'scaron', 'copyright', 'ordfeminine', 'guillemotleft', - 'logicalnot', 'hyphen', 'registered', 'macron', - 'degree', 'plusminus', 'twosuperior', 'threesuperior', - 'Zcaron', 'mu', 'paragraph', 'periodcentered', - 'zcaron', 'onesuperior', 'ordmasculine', 'guillemotright', - 'OE', 'oe', 'Ydieresis', 'questiondown', - 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', - 'Adieresis', 'Aring', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', - 'Eth', 'Ntilde', 'Ograve', 'Oacute', - 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', - 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Yacute', 'Thorn', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'atilde', - 'adieresis', 'aring', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'igrave', 'iacute', 'icircumflex', 'idieresis', - 'eth', 'ntilde', 'ograve', 'oacute', - 'ocircumflex', 'otilde', 'odieresis', 'divide', - 'oslash', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'yacute', 'thorn', 'ydieresis' - ], -# Central Europe - 'ISO-8859-16' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'Aogonek', 'aogonek', 'Lslash', - 'Euro', 'quotedblbase', 'Scaron', 'section', - 'scaron', 'copyright', 'Scommaaccent', 'guillemotleft', - 'Zacute', 'hyphen', 'zacute', 'Zdotaccent', - 'degree', 'plusminus', 'Ccaron', 'lslash', - 'Zcaron', 'quotedblright', 'paragraph', 'periodcentered', - 'zcaron', 'ccaron', 'scommaaccent', 'guillemotright', - 'OE', 'oe', 'Ydieresis', 'zdotaccent', - 'Agrave', 'Aacute', 'Acircumflex', 'Abreve', - 'Adieresis', 'Cacute', 'AE', 'Ccedilla', - 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', - 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', - 'Dcroat', 'Nacute', 'Ograve', 'Oacute', - 'Ocircumflex', 'Ohungarumlaut', 'Odieresis', 'Sacute', - 'Uhungarumlaut', 'Ugrave', 'Uacute', 'Ucircumflex', - 'Udieresis', 'Eogonek', 'Tcommaaccent', 'germandbls', - 'agrave', 'aacute', 'acircumflex', 'abreve', - 'adieresis', 'cacute', 'ae', 'ccedilla', - 'egrave', 'eacute', 'ecircumflex', 'edieresis', - 'igrave', 'iacute', 'icircumflex', 'idieresis', - 'dcroat', 'nacute', 'ograve', 'oacute', - 'ocircumflex', 'ohungarumlaut', 'odieresis', 'sacute', - 'uhungarumlaut', 'ugrave', 'uacute', 'ucircumflex', - 'udieresis', 'eogonek', 'tcommaaccent', 'ydieresis' - ], -# Russian - 'KOI8-R' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'SF100000', 'SF110000', 'SF010000', 'SF030000', - 'SF020000', 'SF040000', 'SF080000', 'SF090000', - 'SF060000', 'SF070000', 'SF050000', 'upblock', - 'dnblock', 'block', 'lfblock', 'rtblock', - 'ltshade', 'shade', 'dkshade', 'integraltp', - 'filledbox', 'periodcentered', 'radical', 'approxequal', - 'lessequal', 'greaterequal', 'space', 'integralbt', - 'degree', 'twosuperior', 'periodcentered', 'divide', - 'SF430000', 'SF240000', 'SF510000', 'afii10071', - 'SF520000', 'SF390000', 'SF220000', 'SF210000', - 'SF250000', 'SF500000', 'SF490000', 'SF380000', - 'SF280000', 'SF270000', 'SF260000', 'SF360000', - 'SF370000', 'SF420000', 'SF190000', 'afii10023', - 'SF200000', 'SF230000', 'SF470000', 'SF480000', - 'SF410000', 'SF450000', 'SF460000', 'SF400000', - 'SF540000', 'SF530000', 'SF440000', 'copyright', - 'afii10096', 'afii10065', 'afii10066', 'afii10088', - 'afii10069', 'afii10070', 'afii10086', 'afii10068', - 'afii10087', 'afii10074', 'afii10075', 'afii10076', - 'afii10077', 'afii10078', 'afii10079', 'afii10080', - 'afii10081', 'afii10097', 'afii10082', 'afii10083', - 'afii10084', 'afii10085', 'afii10072', 'afii10067', - 'afii10094', 'afii10093', 'afii10073', 'afii10090', - 'afii10095', 'afii10091', 'afii10089', 'afii10092', - 'afii10048', 'afii10017', 'afii10018', 'afii10040', - 'afii10021', 'afii10022', 'afii10038', 'afii10020', - 'afii10039', 'afii10026', 'afii10027', 'afii10028', - 'afii10029', 'afii10030', 'afii10031', 'afii10032', - 'afii10033', 'afii10049', 'afii10034', 'afii10035', - 'afii10036', 'afii10037', 'afii10024', 'afii10019', - 'afii10046', 'afii10045', 'afii10025', 'afii10042', - 'afii10047', 'afii10043', 'afii10041', 'afii10044' - ], -# Ukrainian - 'KOI8-U' => [ - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - '.notdef', '.notdef', '.notdef', '.notdef', - 'space', 'exclam', 'quotedbl', 'numbersign', - 'dollar', 'percent', 'ampersand', 'quotesingle', - 'parenleft', 'parenright', 'asterisk', 'plus', - 'comma', 'hyphen', 'period', 'slash', - 'zero', 'one', 'two', 'three', - 'four', 'five', 'six', 'seven', - 'eight', 'nine', 'colon', 'semicolon', - 'less', 'equal', 'greater', 'question', - 'at', 'A', 'B', 'C', - 'D', 'E', 'F', 'G', - 'H', 'I', 'J', 'K', - 'L', 'M', 'N', 'O', - 'P', 'Q', 'R', 'S', - 'T', 'U', 'V', 'W', - 'X', 'Y', 'Z', 'bracketleft', - 'backslash', 'bracketright', 'asciicircum', 'underscore', - 'grave', 'a', 'b', 'c', - 'd', 'e', 'f', 'g', - 'h', 'i', 'j', 'k', - 'l', 'm', 'n', 'o', - 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', - 'x', 'y', 'z', 'braceleft', - 'bar', 'braceright', 'asciitilde', '.notdef', - 'SF100000', 'SF110000', 'SF010000', 'SF030000', - 'SF020000', 'SF040000', 'SF080000', 'SF090000', - 'SF060000', 'SF070000', 'SF050000', 'upblock', - 'dnblock', 'block', 'lfblock', 'rtblock', - 'ltshade', 'shade', 'dkshade', 'integraltp', - 'filledbox', 'bullet', 'radical', 'approxequal', - 'lessequal', 'greaterequal', 'space', 'integralbt', - 'degree', 'twosuperior', 'periodcentered', 'divide', - 'SF430000', 'SF240000', 'SF510000', 'afii10071', - 'afii10101', 'SF390000', 'afii10103', 'afii10104', - 'SF250000', 'SF500000', 'SF490000', 'SF380000', - 'SF280000', 'afii10098', 'SF260000', 'SF360000', - 'SF370000', 'SF420000', 'SF190000', 'afii10023', - 'afii10053', 'SF230000', 'afii10055', 'afii10056', - 'SF410000', 'SF450000', 'SF460000', 'SF400000', - 'SF540000', 'afii10050', 'SF440000', 'copyright', - 'afii10096', 'afii10065', 'afii10066', 'afii10088', - 'afii10069', 'afii10070', 'afii10086', 'afii10068', - 'afii10087', 'afii10074', 'afii10075', 'afii10076', - 'afii10077', 'afii10078', 'afii10079', 'afii10080', - 'afii10081', 'afii10097', 'afii10082', 'afii10083', - 'afii10084', 'afii10085', 'afii10072', 'afii10067', - 'afii10094', 'afii10093', 'afii10073', 'afii10090', - 'afii10095', 'afii10091', 'afii10089', 'afii10092', - 'afii10048', 'afii10017', 'afii10018', 'afii10040', - 'afii10021', 'afii10022', 'afii10038', 'afii10020', - 'afii10039', 'afii10026', 'afii10027', 'afii10028', - 'afii10029', 'afii10030', 'afii10031', 'afii10032', - 'afii10033', 'afii10049', 'afii10034', 'afii10035', - 'afii10036', 'afii10037', 'afii10024', 'afii10019', - 'afii10046', 'afii10045', 'afii10025', 'afii10042', - 'afii10047', 'afii10043', 'afii10041', 'afii10044' - ] -} - -def ReadAFM(file, map) - - # Read a font metric file - a = IO.readlines(file) - - raise "File no found: #{file}" if a.size == 0 - - widths = {} - fm = {} - fix = { 'Edot' => 'Edotaccent', 'edot' => 'edotaccent', - 'Idot' => 'Idotaccent', - 'Zdot' => 'Zdotaccent', 'zdot' => 'zdotaccent', - 'Odblacute' => 'Ohungarumlaut', 'odblacute' => 'ohungarumlaut', - 'Udblacute' => 'Uhungarumlaut', 'udblacute' => 'uhungarumlaut', - 'Gcedilla' => 'Gcommaaccent', 'gcedilla' => 'gcommaaccent', - 'Kcedilla' => 'Kcommaaccent', 'kcedilla' => 'kcommaaccent', - 'Lcedilla' => 'Lcommaaccent', 'lcedilla' => 'lcommaaccent', - 'Ncedilla' => 'Ncommaaccent', 'ncedilla' => 'ncommaaccent', - 'Rcedilla' => 'Rcommaaccent', 'rcedilla' => 'rcommaaccent', - 'Scedilla' => 'Scommaaccent',' scedilla' => 'scommaaccent', - 'Tcedilla' => 'Tcommaaccent',' tcedilla' => 'tcommaaccent', - 'Dslash' => 'Dcroat', 'dslash' => 'dcroat', - 'Dmacron' => 'Dcroat', 'dmacron' => 'dcroat', - 'combininggraveaccent' => 'gravecomb', - 'combininghookabove' => 'hookabovecomb', - 'combiningtildeaccent' => 'tildecomb', - 'combiningacuteaccent' => 'acutecomb', - 'combiningdotbelow' => 'dotbelowcomb', - 'dongsign' => 'dong' - } - - a.each do |line| - - e = line.rstrip.split(' ') - next if e.size < 2 - - code = e[0] - param = e[1] - - if code == 'C' then - - # Character metrics - cc = e[1].to_i - w = e[4] - gn = e[7] - - gn = 'Euro' if gn[-4, 4] == '20AC' - - if fix[gn] then - - # Fix incorrect glyph name - 0.upto(map.size - 1) do |i| - if map[i] == fix[gn] then - map[i] = gn - end - end - end - - if map.size == 0 then - # Symbolic font: use built-in encoding - widths[cc] = w - else - widths[gn] = w - fm['CapXHeight'] = e[13].to_i if gn == 'X' - end - - fm['MissingWidth'] = w if gn == '.notdef' - - elsif code == 'FontName' then - fm['FontName'] = param - elsif code == 'Weight' then - fm['Weight'] = param - elsif code == 'ItalicAngle' then - fm['ItalicAngle'] = param.to_f - elsif code == 'Ascender' then - fm['Ascender'] = param.to_i - elsif code == 'Descender' then - fm['Descender'] = param.to_i - elsif code == 'UnderlineThickness' then - fm['UnderlineThickness'] = param.to_i - elsif code == 'UnderlinePosition' then - fm['UnderlinePosition'] = param.to_i - elsif code == 'IsFixedPitch' then - fm['IsFixedPitch'] = (param == 'true') - elsif code == 'FontBBox' then - fm['FontBBox'] = "[#{e[1]},#{e[2]},#{e[3]},#{e[4]}]" - elsif code == 'CapHeight' then - fm['CapHeight'] = param.to_i - elsif code == 'StdVW' then - fm['StdVW'] = param.to_i - end - end - - raise 'FontName not found' unless fm['FontName'] - - if map.size > 0 then - widths['.notdef'] = 600 unless widths['.notdef'] - - if (widths['Delta'] == nil) && widths['increment'] then - widths['Delta'] = widths['increment'] - end - - # Order widths according to map - 0.upto(255) do |i| - if widths[map[i]] == nil - puts "Warning: character #{map[i]} is missing" - widths[i] = widths['.notdef'] - else - widths[i] = widths[map[i]] - end - end - end - - fm['Widths'] = widths - - return fm -end - -def MakeFontDescriptor(fm, symbolic) - - # Ascent - asc = fm['Ascender'] ? fm['Ascender'] : 1000 - fd = "{\n 'Ascent' => '#{asc}'" - - # Descent - desc = fm['Descender'] ? fm['Descender'] : -200 - fd += ", 'Descent' => '#{desc}'" - - # CapHeight - if fm['CapHeight'] then - ch = fm['CapHeight'] - elsif fm['CapXHeight'] - ch = fm['CapXHeight'] - else - ch = asc - end - fd += ", 'CapHeight' => '#{ch}'" - - # Flags - flags = 0 - - if fm['IsFixedPitch'] then - flags += 1 << 0 - end - - if symbolic then - flags += 1 << 2 - else - flags += 1 << 5 - end - - if fm['ItalicAngle'] && (fm['ItalicAngle'] != 0) then - flags += 1 << 6 - end - - fd += ",\n 'Flags' => '#{flags}'" - - # FontBBox - if fm['FontBBox'] then - fbb = fm['FontBBox'].gsub(/,/, ' ') - else - fbb = "[0 #{desc - 100} 1000 #{asc + 100}]" - end - - fd += ", 'FontBBox' => '#{fbb}'" - - # ItalicAngle - ia = fm['ItalicAngle'] ? fm['ItalicAngle'] : 0 - fd += ",\n 'ItalicAngle' => '#{ia}'" - - # StemV - if fm['StdVW'] then - stemv = fm['StdVW'] - elsif fm['Weight'] && (/bold|black/i =~ fm['Weight']) - stemv = 120 - else - stemv = 70 - end - - fd += ", 'StemV' => '#{stemv}'" - - # MissingWidth - if fm['MissingWidth'] then - fd += ", 'MissingWidth' => '#{fm['MissingWidth']}'" - end - - fd += "\n }" - return fd -end - -def MakeWidthArray(fm) - - # Make character width array - s = " [\n " - - cw = fm['Widths'] - - 0.upto(255) do |i| - s += "%5d" % cw[i] - s += "," if i != 255 - s += "\n " if (i % 8) == 7 - end - - s += ']' - - return s -end - -def MakeFontEncoding(map) - - # Build differences from reference encoding - ref = Charencodings['cp1252'] - s = '' - last = 0 - 32.upto(255) do |i| - if map[i] != ref[i] then - if i != last + 1 then - s += i.to_s + ' ' - end - last = i - s += '/' + map[i] + ' ' - end - end - return s.rstrip -end - -def ReadShort(f) - a = f.read(2).unpack('n') - return a[0] -end - -def ReadLong(f) - a = f.read(4).unpack('N') - return a[0] -end - -def CheckTTF(file) - - rl = false - pp = false - e = false - - # Check if font license allows embedding - File.open(file, 'rb') do |f| - - # Extract number of tables - f.seek(4, IO::SEEK_CUR) - nb = ReadShort(f) - f.seek(6, IO::SEEK_CUR) - - # Seek OS/2 table - found = false - 0.upto(nb - 1) do |i| - if f.read(4) == 'OS/2' then - found = true - break - end - - f.seek(12, IO::SEEK_CUR) - end - - if ! found then - return - end - - f.seek(4, IO::SEEK_CUR) - offset = ReadLong(f) - f.seek(offset, IO::SEEK_SET) - - # Extract fsType flags - f.seek(8, IO::SEEK_CUR) - fsType = ReadShort(f) - - rl = (fsType & 0x02) != 0 - pp = (fsType & 0x04) != 0 - e = (fsType & 0x08) != 0 - end - - if rl && ( ! pp) && ( ! e) then - puts 'Warning: font license does not allow embedding' - end -end - -# -# fontfile: path to TTF file (or empty string if not to be embedded) -# afmfile: path to AFM file -# enc: font encoding (or empty string for symbolic fonts) -# patch: optional patch for encoding -# type : font type if $fontfile is empty -# -def MakeFont(fontfile, afmfile, enc = 'cp1252', patch = {}, type = 'TrueType') - # Generate a font definition file - if (enc != nil) && (enc != '') then - map = Charencodings[enc] - patch.each { |cc, gn| map[cc] = gn } - else - map = [] - end - - raise "Error: AFM file not found: #{afmfile}" unless File.exists?(afmfile) - - fm = ReadAFM(afmfile, map) - - if (enc != nil) && (enc != '') then - diff = MakeFontEncoding(map) - else - diff = '' - end - - fd = MakeFontDescriptor(fm, (map.size == 0)) - - # Find font type - if fontfile then - ext = File.extname(fontfile).downcase.sub(/\A\./, '') - - if ext == 'ttf' then - type = 'TrueType' - elsif ext == 'pfb' - type = 'Type1' - else - raise "Error: unrecognized font file extension: #{ext}" - end - else - raise "Error: incorrect font type: #{type}" if (type != 'TrueType') && (type != 'Type1') - end - printf "type = #{type}\n" - # Start generation - s = "# #{fm['FontName']} font definition\n\n" - s += "module FontDef\n" - s += " def FontDef.type\n '#{type}'\n end\n" - s += " def FontDef.name\n '#{fm['FontName']}'\n end\n" - s += " def FontDef.desc\n #{fd}\n end\n" - - if fm['UnderlinePosition'] == nil then - fm['UnderlinePosition'] = -100 - end - - if fm['UnderlineThickness'] == nil then - fm['UnderlineThickness'] = 50 - end - - s += " def FontDef.up\n #{fm['UnderlinePosition']}\n end\n" - s += " def FontDef.ut\n #{fm['UnderlineThickness']}\n end\n" - - w = MakeWidthArray(fm) - s += " def FontDef.cw\n#{w}\n end\n" - - s += " def FontDef.enc\n '#{enc}'\n end\n" - s += " def FontDef.diff\n #{(diff == nil) || (diff == '') ? 'nil' : '\'' + diff '\''}\n end\n" - - basename = File.basename(afmfile, '.*') - - if fontfile then - # Embedded font - if ! File.exist?(fontfile) then - raise "Error: font file not found: #{fontfile}" - end - - if type == 'TrueType' then - CheckTTF(fontfile) - end - - file = '' - File.open(fontfile, 'rb') do |f| - file = f.read() - end - - if type == 'Type1' then - # Find first two sections and discard third one - header = file[0] == 128 - file = file[6, file.length - 6] if header - - pos = file.index('eexec') - raise 'Error: font file does not seem to be valid Type1' if pos == nil - - size1 = pos + 6 - - file = file[0, size1] + file[size1 + 6, file.length - (size1 + 6)] if header && file[size1] == 128 - - pos = file.index('00000000') - raise 'Error: font file does not seem to be valid Type1' if pos == nil - - size2 = pos - size1 - file = file[0, size1 + size2] - end - - if require 'zlib' then - File.open(basename + '.z', 'wb') { |f| f.write(Zlib::Deflate.deflate(file)) } - s += " def FontDef.file\n '#{basename}.z'\n end\n" - puts "Font file compressed ('#{basename}.z')" - else - s += " def FontDef.file\n '#{File.basename(fontfile)}'\n end\n" - puts 'Notice: font file could not be compressed (zlib not available)' - end - - if type == 'Type1' then - s += " def FontDef.size1\n '#{size1}'\n end\n" - s += " def FontDef.size2\n '#{size2}'\n end\n" - else - s += " def FontDef.originalsize\n '#{File.size(fontfile)}'\n end\n" - end - - else - # Not embedded font - s += " def FontDef.file\n ''\n end\n" - end - - s += "end\n" - File.open(basename + '.rb', 'w') { |file| file.write(s)} - puts "Font definition file generated (#{basename}.rb)" -end - - -if $0 == __FILE__ then - if ARGV.length >= 3 then - enc = ARGV[2] - else - enc = 'cp1252' - end - - if ARGV.length >= 4 then - patch = ARGV[3] - else - patch = {} - end - - if ARGV.length >= 5 then - type = ARGV[4] - else - type = 'TrueType' - end - - MakeFont(ARGV[0], ARGV[1], enc, patch, type) -end