home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / delphi / kompon / d3456 / POWERPDF.ZIP / PowerPdf / PdfJPFonts.pas < prev    next >
Pascal/Delphi Source File  |  2001-09-15  |  33KB  |  1,067 lines

  1. {*
  2.  * << P o w e r P d f >> -- PdfJpFonts.pas
  3.  *
  4.  * << Japanese font set for Shift-JIS Charactors >>
  5.  *
  6.  * Copyright (c) 1999-1101 Takezou. <takeshi_kanno@est.hi-ho.ne.jp>
  7.  *
  8.  * This library is free software; you can redistribute it and/or modify it
  9.  * under the terms of the GNU Library General Public License as published
  10.  * by the Free Software Foundation; either version 2 of the License, or any
  11.  * later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful, but WITHOUT
  14.  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15.  * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
  16.  * details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public License
  19.  * along with this library.
  20.  *
  21.  * Create 2001.04.14
  22.  *
  23.  *}
  24. unit PdfJpFonts;
  25.  
  26. interface
  27.  
  28. uses
  29.   SysUtils, Classes, PdfDoc, PdfTypes;
  30.  
  31. const
  32.   CIDTYPE2_JP_FONT_STR_TABLE: array[0..2] of TPDF_STR_TBL =(
  33.                          (KEY: 'Type'; VAL: 'Font'),
  34.                          (KEY: 'Subtype'; VAL: 'CIDFontType2'),
  35.                          (KEY: 'WinCharSet'; VAL: '128')
  36.                          );
  37.  
  38.   CIDTYPE2_JP_FONT_DEFAULT_WIDTH = 1000;
  39.   CIDTYPE2_JP_FONT_WIDTH_ARRAY: array[0..2] of Integer = (231, 631, 500);
  40.  
  41.   CIDTYPE2_JP_FONT_BBOX: array[0..3] of Integer = (0,-141,1000,859);
  42.  
  43.   CIDTYPE2_JP_FONT_DISC_INT_TABLE: array[0..3] of TPDF_INT_TBL =(
  44.                          (KEY: 'Ascent'; VAL: 859),
  45.                          (KEY: 'CapHeight'; VAL: 859),
  46.                          (KEY: 'Descent'; VAL: -141),
  47.                          (KEY: 'MissingWidth'; VAL: 500)
  48.                          );
  49.  
  50.   TYPE0_JP_FONT_STR_TABLE: array[0..2] of TPDF_STR_TBL =(
  51.                          (KEY: 'Type'; VAL: 'Font'),
  52.                          (KEY: 'Subtype'; VAL: 'Type0'),
  53.                          (KEY: 'Encoding'; VAL: '90ms-RKSJ-H')
  54.                          );
  55.  
  56.   TYPE0_JPP_FONT_STR_TABLE: array[0..2] of TPDF_STR_TBL =(
  57.                          (KEY: 'Type'; VAL: 'Font'),
  58.                          (KEY: 'Subtype'; VAL: 'Type0'),
  59.                          (KEY: 'Encoding'; VAL: '90msp-RKSJ-H')
  60.                          );
  61.  
  62.   // PGothic widths array from CID 1
  63.   PGOTHIC_FONT_WIDTH_ARRAY1: array[0..94]of Integer = (
  64.        305,219,500,500,500,500,594,203,305,305,500,500,203,500,203,500,
  65.        500,500,500,500,500,500,500,500,500,500,203,203,500,500,500,453,
  66.        668,633,637,664,648,566,551,680,641,246,543,598,539,742,641,707,
  67.        617,707,625,602,590,641,633,742,602,590,566,336,504,336,414,305,
  68.        414,477,496,500,496,500,305,461,500,211,219,461,211,734,500,508,
  69.        496,496,348,461,352,500,477,648,461,477,457,234,234,234,414
  70.        );
  71.  
  72.   // PGothic widths array from CID 326
  73.   PGOTHIC_FONT_WIDTH_ARRAY2: array[0..63] of Integer = (
  74.        500,441,441,441,441,441,547,523,445,480,469,516,523,504,438,500,
  75.        641,617,566,625,598,637,563,652,539,621,523,664,590,637,645,555,
  76.        527,602,602,602,461,645,598,578,648,492,637,516,547,613,641,605,
  77.        453,660,508,609,664,641,520,559,512,656,566,559,590,563,250,230
  78.        );
  79.  
  80.   // PGothic widths array from CID 633
  81.   PGOTHIC_FONT_WIDTH_ARRAY3: array[0..62]of Integer = (
  82.        664,664,664,664,664,500,500,500,1000,1000,500,500,500,500,500,500,
  83.        1000,1000,746,746,734,699,1000,1000,1000,1000,1000,961,1000,500,1000,1000,
  84.        1000,1000,1000,1000,1000,500,500,500,500,500,500,500,500,500,500,500,
  85.        500,500,500,500,500,500,500,500,500,500,500,1000,1000,1000,1000
  86.        );
  87.  
  88.   // PGothic widths array from CID 771
  89.   PGOTHIC_FONT_WIDTH_ARRAY4: array[0..7]of Integer = (
  90.        1000,1000,1000,1000,1000,500,500,500
  91.        );
  92.  
  93.   // PGothic widths array from CID 780
  94.   PGOTHIC_FONT_WIDTH_ARRAY5: array[0..9]of Integer = (
  95.        684,684,684,684,684,684,684,684,684,684
  96.        );
  97.  
  98.   // PGothic widths array from CID 790
  99.   PGOTHIC_FONT_WIDTH_ARRAY6: array[0..25]of Integer = (
  100.        715,777,742,758,711,633,773,770,273,605,754,629,934,770,805,711,
  101.        805,758,742,617,770,715,980,652,648,648
  102.        );
  103.  
  104.   // PGothic widths array from CID 816
  105.   PGOTHIC_FONT_WIDTH_ARRAY7: array[0..25]of Integer = (
  106.        574,602,563,602,563,297,578,621,250,250,594,250,938,621,605,605,
  107.        602,379,570,336,621,512,777,520,496,508
  108.        );
  109.  
  110.   // PGothic widths array from CID 842
  111.   PGOTHIC_FONT_WIDTH_ARRAY8: array[0..82]of Integer = (
  112.        746,941,805,945,602,707,750,902,805,945,1000,1000,844,902,590,816,
  113.        945,980,797,895,766,883,766,766,961,980,1000,1000,922,961,922,922,
  114.        863,902,805,953,957,902,902,766,883,902,941,1000,1000,1000,1000,1000,
  115.        1000,961,961,961,1000,1000,1000,1000,1000,1000,1000,1000,1000,891,1000,980,
  116.        980,805,844,1000,844,980,727,863,805,746,863,1000,844,863,1000,1000,
  117.        1000,855,961
  118.        );
  119.  
  120.   // PGothic widths array from CID 925
  121.   PGOTHIC_FONT_WIDTH_ARRAY9: array[0..62]of Integer = (
  122.        758,898,652,824,754,941,742,895,809,934,824,922,961,965,805,941,
  123.        930,961,797,891,1000,1000,898,898,902,965,914,980,805,883,766,922,
  124.        910,961,734,863,922,887,961,648,707,941,910,824,930,707,1000,1000,
  125.        1000,766,863,863,805,883,883,945,945,945,922,953,953,902,668
  126.        );
  127.  
  128.   // PGothic widths array from CID 988
  129.   PGOTHIC_FONT_WIDTH_ARRAY10: array[0..22]of Integer = (
  130.        977,719,898,805,980,813,961,629,727,809,746,1000,852,863,766,941,
  131.        1000,1000,805,863,961,727,777
  132.        );
  133.  
  134.   // PMincyo widths array from CID 1
  135.   PMINCYO_FONT_WIDTH_ARRAY1: array[0..94]of Integer = (
  136.        305,305,461,500,500,500,613,305,305,305,500,500,305,500,305,500,
  137.        500,500,500,500,500,500,500,500,500,500,305,305,500,500,500,500,
  138.        727,664,621,699,691,598,598,711,723,289,387,668,586,801,664,766,
  139.        563,766,602,504,625,691,664,871,656,625,563,332,500,332,305,305,
  140.        305,453,500,465,500,473,254,473,500,242,242,492,242,703,500,500,
  141.        500,500,367,414,352,500,477,602,469,477,453,242,219,242,500
  142.        );
  143.  
  144.   // PMincyo widths array from CID 326
  145.   PMINCYO_FONT_WIDTH_ARRAY2: array[0..63] of Integer = (
  146.        500,441,441,441,441,441,547,523,445,480,469,516,523,504,438,500,
  147.        641,617,566,625,598,637,563,652,539,621,523,664,590,637,645,555,
  148.        527,602,602,602,461,645,598,578,648,492,637,516,547,613,641,605,
  149.        453,660,508,609,664,641,520,559,512,656,566,559,590,563,250,230
  150.        );
  151.  
  152.   // PMincyo widths array from CID 633
  153.   PMINCYO_FONT_WIDTH_ARRAY3: array[0..62]of Integer = (
  154.        664,664,664,664,664,500,500,500,1000,1000,500,500,500,500,500,500,
  155.        1000,1000,648,801,652,703,1000,1000,1000,1000,1000,1000,1000,500,1000,1000,
  156.        1000,1000,1000,1000,1000,500,500,500,500,500,500,500,500,500,500,500,
  157.        500,500,500,500,500,500,500,500,500,500,500,1000,1000,1000,1000
  158.        );
  159.  
  160.   // PMincyo widths array from CID 771
  161.   PMINCYO_FONT_WIDTH_ARRAY4: array[0..7]of Integer = (
  162.        1000,1000,1000,1000,1000,500,500,500
  163.        );
  164.  
  165.   // PMincyo widths array from CID 780
  166.   PMINCYO_FONT_WIDTH_ARRAY5: array[0..9]of Integer = (
  167.        621,621,621,621,621,621,621,621,621,621
  168.        );
  169.  
  170.   // PMincyo widths array from CID 790
  171.   PMINCYO_FONT_WIDTH_ARRAY6: array[0..25]of Integer = (
  172.        805,715,762,813,719,688,801,859,359,359,805,676,1000,836,832,680,
  173.        832,727,688,719,855,770,977,730,777,656
  174.        );
  175.  
  176.   // PMincyo widths array from CID 816
  177.   PMINCYO_FONT_WIDTH_ARRAY7: array[0..25]of Integer = (
  178.        531,574,531,574,543,387,559,613,293,293,570,293,875,613,574,574,
  179.        574,414,469,422,613,543,781,574,563,500
  180.        );
  181.  
  182.   // PMincyo widths array from CID 842
  183.   PMINCYO_FONT_WIDTH_ARRAY8: array[0..82]of Integer = (
  184.        754,883,750,953,508,617,703,898,801,1000,945,949,793,895,645,805,
  185.        914,980,754,867,754,883,777,777,1000,1000,1000,1000,922,961,906,949,
  186.        902,902,855,1000,1000,902,941,703,844,902,949,1000,1000,949,969,1000,
  187.        1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,945,980,980,824,1000,1000,
  188.        953,758,875,1000,836,934,688,785,766,641,793,984,863,801,953,945,
  189.        984,855,945
  190.        );
  191.  
  192.   // PMincyo widths array from CID 925
  193.   PMINCYO_FONT_WIDTH_ARRAY9: array[0..62]of Integer = (
  194.        750,891,668,777,707,801,805,941,809,941,879,926,887,902,746,883,
  195.        883,934,793,863,953,961,902,902,820,902,930,949,754,855,785,910,
  196.        965,945,734,848,922,902,1000,590,707,973,910,805,922,699,977,977,
  197.        977,656,852,844,844,945,945,1000,1000,1000,883,922,922,930,609
  198.        );
  199.  
  200.   // PMincyo widths array from CID 988
  201.   PMINCYO_FONT_WIDTH_ARRAY10: array[0..22]of Integer = (
  202.        863,676,941,789,926,793,941,598,703,766,609,980,832,785,699,805,
  203.        965,961,785,863,883,695,766
  204.        );
  205.  
  206. type
  207.   TCharToCMap = function(S: string; Index: integer): integer;
  208.  
  209.   TPdfCIDWidthItem = class(TObject)
  210.   private
  211.     FStrCID: integer;
  212.     FEndCID: integer;
  213.     FWidth: Word;
  214.   protected
  215.     property StrCID: integer read FStrCID write FStrCID;
  216.     property EndCID: integer read FEndCID write FEndCID;
  217.     property Width: Word read FWidth write FWidth;
  218.   end;
  219.  
  220.   TPdfType0Font = class(TPdfFont)
  221.   private
  222.     FCharToCMap: TCharToCMap;
  223.     FArray: TList;
  224.     FDW: Word;
  225.     FMissingWidth: Word;
  226.   protected
  227.     function CidWidth(CID: integer): Word;
  228.   public
  229.     destructor Destroy; override;
  230.     procedure SetData(AData: TPdfDictionary); override;
  231.     procedure SetCharToCMap(AFunc: TCharToCMap); virtual;
  232.     function GetCharWidth(AText: string; APos: integer): integer; override;
  233.   end;
  234.  
  235.   TPdfJpFont = class(TPdfType0Font)
  236.   protected
  237.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); virtual;
  238.     procedure AddDescendantFontItem(ADescendantFont: TPdfDictionary); virtual;
  239.     function GetFontName: string; virtual;
  240.   public
  241.     constructor Create(AXref: TPdfXref; AName: string); override;
  242.   end;
  243.  
  244.   TPdfJpFixedFont = class(TPdfJpFont)
  245.   protected
  246.     procedure AddDescendantFontItem(ADescendantFont: TPdfDictionary); override;
  247.   public
  248.     constructor Create(AXref: TPdfXref; AName: string); override;
  249.   end;
  250.  
  251.   TPdfGothic = class(TPdfJpFixedFont)
  252.   protected
  253.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  254.     function GetFontName: string; override;
  255.   end;
  256.  
  257.   TPdfGothicBold = class(TPdfJpFixedFont)
  258.   protected
  259.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  260.     function GetFontName: string; override;
  261.   end;
  262.  
  263.   TPdfGothicItalic = class(TPdfJpFixedFont)
  264.   protected
  265.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  266.     function GetFontName: string; override;
  267.   end;
  268.  
  269.   TPdfGothicBoldItalic = class(TPdfJpFixedFont)
  270.   protected
  271.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  272.     function GetFontName: string; override;
  273.   end;
  274.  
  275.   TPdfMincyo = class(TPdfJpFixedFont)
  276.   protected
  277.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  278.     function GetFontName: string; override;
  279.   end;
  280.  
  281.   TPdfMincyoBold = class(TPdfJpFixedFont)
  282.   protected
  283.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  284.     function GetFontName: string; override;
  285.   end;
  286.  
  287.   TPdfMincyoItalic = class(TPdfJpFixedFont)
  288.   protected
  289.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  290.     function GetFontName: string; override;
  291.   end;
  292.  
  293.   TPdfMincyoBoldItalic = class(TPdfJpFixedFont)
  294.   protected
  295.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  296.     function GetFontName: string; override;
  297.   end;
  298.  
  299.   TPdfJpProportionalFont = class(TPdfJpFont)
  300.   public
  301.     constructor Create(AXref: TPdfXref; AName: string); override;
  302.   end;
  303.  
  304.   TPdfPGothic = class(TPdfJpProportionalFont)
  305.   protected
  306.     procedure AddDescendantFontItem(ADescendantFont: TPdfDictionary); override;
  307.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  308.     function GetFontName: string; override;
  309.   end;
  310.  
  311.   TPdfPGothicBold = class(TPdfPGothic)
  312.   protected
  313.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  314.     function GetFontName: string; override;
  315.   end;
  316.  
  317.   TPdfPGothicItalic = class(TPdfPGothic)
  318.   protected
  319.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  320.     function GetFontName: string; override;
  321.   end;
  322.  
  323.   TPdfPGothicBoldItalic = class(TPdfPGothic)
  324.   protected
  325.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  326.     function GetFontName: string; override;
  327.   end;
  328.  
  329.   TPdfPMincyo = class(TPdfJpProportionalFont)
  330.   protected
  331.     procedure AddDescendantFontItem(ADescendantFont: TPdfDictionary); override;
  332.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  333.     function GetFontName: string; override;
  334.   end;
  335.  
  336.   TPdfPMincyoBold = class(TPdfPMincyo)
  337.   protected
  338.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  339.     function GetFontName: string; override;
  340.   end;
  341.  
  342.   TPdfPMincyoItalic = class(TPdfPMincyo)
  343.   protected
  344.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  345.     function GetFontName: string; override;
  346.   end;
  347.  
  348.   TPdfPMincyoBoldItalic = class(TPdfPMincyo)
  349.   protected
  350.     procedure AddDescriptorItem(AFontDescriptor: TPdfDictionary); override;
  351.     function GetFontName: string; override;
  352.   end;
  353.  
  354. implementation
  355.  
  356. uses
  357.   PdfJpCMap;
  358.  
  359. { TPdfType0Font }
  360.  
  361. // SetData
  362. procedure TPdfType0Font.SetData(AData: TPdfDictionary);
  363. var
  364.   DescendantFonts: TPdfArray;
  365.   DescendantFont: TPdfDictionary;
  366.   Discriptor: TPdfDictionary;
  367.   CIDWidthItem: TPdfCIDWidthItem;
  368.   i, j: integer;
  369.   WidthsRoot, Widths: TPdfArray;
  370.   TmpCID: integer;
  371. begin
  372.   inherited SetData(AData);
  373.  
  374.   // set font attributes from specified font data.
  375.   DescendantFonts := Data.PdfArrayByName('DescendantFonts');
  376.   DescendantFont := TPdfDictionary(DescendantFonts.Items[0]);
  377.   FDW := DescendantFont.PdfNumberByName('DW').Value;
  378.   Discriptor := DescendantFont.PdfDictionaryByName('FontDescriptor');
  379.   FMissingWidth := Discriptor.PdfNumberByName('MissingWidth').Value;
  380.   FArray := TList.Create;
  381.   WidthsRoot := DescendantFont.PdfArrayByName('W');
  382.  
  383.   // create widths array from "W"attribute.
  384.   i := 0;
  385.   while i < WidthsRoot.ItemCount do
  386.   begin
  387.     // "W"attribute constst of forrowing data format.
  388.     // type1. <CID of first char> <CID if last char> <char width>
  389.     // type2. <CID od first char> "["<array of char widths>"]"
  390.  
  391.     if not (WidthsRoot.Items[i] is TPdfNumber) then
  392.      raise EPdfInvalidValue.Create('invalid W array start pos..');
  393.  
  394.     TmpCID := TPdfNumber(WidthsRoot.Items[i]).Value;
  395.     inc(i);
  396.     if i >= WidthsRoot.ItemCount then Break;
  397.  
  398.     if (WidthsRoot.Items[i] is TPdfNumber) then
  399.     begin
  400.       // type1 data format.
  401.       CIDWidthItem := TPdfCIDWidthItem.Create;
  402.       CIDWidthItem.StrCID := TmpCID;
  403.       inc(i);
  404.       if not (WidthsRoot.Items[i] is TPdfNumber) then
  405.         raise EPdfInvalidValue.Create('invalid W array end pos..')
  406.       else
  407.         CIDWidthItem.EndCID := TPdfNumber(WidthsRoot.Items[i]).Value;
  408.     end
  409.     else
  410.     begin
  411.       if not (WidthsRoot.Items[i] is TPdfArray) then
  412.         raise EPdfInvalidValue.Create('invalid W array value..');
  413.       // type2 data format.
  414.       Widths := TPdfArray(WidthsRoot.Items[i]);
  415.       for j := 0 to Widths.ItemCount - 1 do
  416.       begin
  417.         CIDWidthItem := TPdfCIDWidthItem.Create;
  418.         CIDWidthItem.StrCID := TmpCID;
  419.         CIDWidthItem.EndCID := TmpCID;
  420.         CIDWidthItem.Width := TPdfNumber(Widths.Items[j]).Value;
  421.         FArray.Add(CIDWidthItem);
  422.         inc(TmpCID);
  423.       end;
  424.     end;
  425.     inc(i);
  426.   end;
  427. end;
  428.  
  429. // CidWidth
  430. function TPdfType0Font.CidWidth(CID: integer): Word;
  431. var
  432.   i: integer;
  433.   CIDWidthItem: TPdfCIDWidthItem;
  434. begin
  435.   result := 0;
  436.   for i := 0 to FArray.Count - 1 do
  437.   begin
  438.     CIDWidthItem := TPdfCIDWidthItem(FArray.Items[i]);
  439.     if CIDWidthItem.EndCID >= CID then
  440.       if CIDWidthItem.StrCID <= CID then
  441.       begin
  442.         result := CIDWidthItem.Width;
  443.         Break;
  444.       end
  445.       else
  446.         Break;
  447.   end;
  448. end;
  449.  
  450. // GetCharWidth
  451. function TPdfType0Font.GetCharWidth(AText: string; APos: integer): integer;
  452. var
  453.   CID: integer;
  454. begin
  455.   result := 0;
  456.   CID := FCharToCMap(AText, APos);
  457.   if CID = -1 then Exit;
  458.  
  459.   result := CidWidth(CID);
  460.   if result = 0 then
  461.     if ByteType(AText, APos) = mbSingleByte then
  462.       result := FMissingWidth
  463.     else
  464.       result := FDW;
  465. end;
  466.  
  467. // Destroy
  468. destructor TPdfType0Font.Destroy;
  469. var
  470.   i: integer;
  471. begin
  472.   if FArray <> nil then
  473.   begin
  474.     for i := FArray.Count - 1 downto 0 do
  475.       TObject(FArray.Items[i]).Free;
  476.     FArray.Free;
  477.   end;
  478.   inherited;
  479. end;
  480.  
  481. // SetCharToCMap
  482. procedure TPdfType0Font.SetCharToCMap(AFunc: TCharToCMap);
  483. begin
  484.   FCharToCMap := AFunc;
  485. end;
  486.  
  487. { TPdfJpFont }
  488.  
  489. // AddDescriptorItem
  490. procedure TPdfJpFont.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  491. begin
  492. end;
  493.  
  494. // GetFontName
  495. function TPdfJpFont.GetFontName: string;
  496. begin
  497.   result := '';
  498. end;
  499.  
  500. // .AddDescendantFontItem
  501. procedure TPdfJpFont.AddDescendantFontItem(ADescendantFont: TPdfDictionary);
  502. begin
  503. end;
  504.  
  505. // Create
  506. constructor TPdfJpFont.Create(AXref: TPdfXref; AName: string);
  507. var
  508.   FFontDescriptor: TPdfDictionary;
  509.   FFont: TPdfDictionary;
  510.   FDescendantFont: TPdfDictionary;
  511.   FDescendantFontArray: TPdfArray;
  512.   FCIDSystemInfo: TPdfDictionary;
  513. begin
  514.   inherited Create(AXref, AName);
  515.   FFont := TPdfDictionary.CreateDictionary(AXref);
  516.   AXref.AddObject(FFont);
  517.  
  518.   FFont.AddNameItem('BaseFont', GetFontName);
  519.  
  520.   // create descendant font.
  521.   FDescendantFont := TPdfDictionary.CreateDictionary(AXref);
  522.   AXref.AddObject(FDescendantFont);
  523.  
  524.   FDescendantFontArray := TPdfArray.CreateArray(AXref);
  525.   FDescendantFontArray.AddItem(FDescendantFont);
  526.   FFont.AddItem('DescendantFonts', FDescendantFontArray);
  527.  
  528.   AddStrElements(FDescendantFont, CIDTYPE2_JP_FONT_STR_TABLE);
  529.   FDescendantFont.AddNameItem('BaseFont', GetFontName);
  530.  
  531.   FCIDSystemInfo := TPdfDictionary.CreateDictionary(AXref);
  532.   with FCIDSystemInfo do
  533.   begin
  534.     AddItem('Registry', TPdfText.CreateText('Adobe'));
  535.     AddItem('Ordering', TPdfText.CreateText('Japan1'));
  536.     AddItem('Supplement', TPdfNumber.CreateNumber(2));
  537.   end;
  538.  
  539.   with FDescendantFont do
  540.   begin
  541.     AddItem('CIDSystemInfo', FCIDSystemInfo);
  542.     AddNumberItem('DW', CIDTYPE2_JP_FONT_DEFAULT_WIDTH);
  543.   end;
  544.   AddDescendantFontItem(FDescendantFont);
  545.  
  546.   // create font descriptor.
  547.   FFontDescriptor := TPdfDictionary.CreateDictionary(AXref);
  548.   AXref.AddObject(FFontDescriptor);
  549.  
  550.   FFontDescriptor.AddNameItem('Type', 'FontDescriptor');
  551.   FFontDescriptor.AddNameItem('BaseFont', GetFontName);
  552.   AddIntElements(FFontDescriptor, CIDTYPE2_JP_FONT_DISC_INT_TABLE);
  553.   AddDescriptorItem(FFontDescriptor);
  554.   FFontDescriptor.AddItem('FontBBox',
  555.              TPdfArray.CreateNumArray(AXref, CIDTYPE2_JP_FONT_BBOX));
  556.   FDescendantFont.AddItem('FontDescriptor', FFontDescriptor);
  557.  
  558.   SetData(FFont);
  559. end;
  560.  
  561. // AddDescendantFontItem
  562. procedure TPdfJpFixedFont.AddDescendantFontItem(ADescendantFont: TPdfDictionary);
  563. var
  564.   FWidths: TPdfArray;
  565. begin
  566.   FWidths := TPdfArray.CreateNumArray(nil, CIDTYPE2_JP_FONT_WIDTH_ARRAY);
  567.   ADescendantFont.AddItem('W', FWidths);
  568. end;
  569.  
  570. constructor TPdfJpFixedFont.Create(AXref: TPdfXref; AName: string);
  571. begin
  572.   inherited Create(AXref, AName);
  573.   AddStrElements(Data, TYPE0_JP_FONT_STR_TABLE);
  574.   SetCharToCMap(@CharToCMap_90MS_RKSJ_H);
  575. end;
  576.  
  577. { TPdfGothic }
  578. procedure TPdfGothic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  579. var
  580.   Flags: integer;
  581. begin
  582.   with AFontDescriptor do
  583.   begin
  584.     Flags := PDF_FONT_SYMBOLIC +
  585.              PDF_FONT_FIXED_WIDTH;
  586.     AddNumberItem('Flags', Flags);
  587.     AddNumberItem('ItalicAngle', 0);
  588.     AddNumberItem('StemV', 78);
  589.   end;
  590. end;
  591.  
  592. function TPdfGothic.GetFontName: string;
  593. begin
  594.   result := 'Gothic';
  595. end;
  596.  
  597. { TPdfGothicBold }
  598. procedure TPdfGothicBold.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  599. var
  600.   Flags: integer;
  601. begin
  602.   with AFontDescriptor do
  603.   begin
  604.     Flags := PDF_FONT_SYMBOLIC +
  605.              PDF_FONT_FIXED_WIDTH +
  606.              PDF_FONT_FOURCE_BOLD;
  607.     AddNumberItem('Flags', Flags);
  608.     AddNumberItem('ItalicAngle', 0);
  609.     AddNumberItem('StemV', 156);
  610.   end;
  611. end;
  612.  
  613. function TPdfGothicBold.GetFontName: string;
  614. begin
  615.   result := 'Gothic,Bold';
  616. end;
  617.  
  618. { TPdfGothicItalic }
  619.  
  620. // AddDescriptorItem
  621. procedure TPdfGothicItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  622. var
  623.   Flags: integer;
  624. begin
  625.   with AFontDescriptor do
  626.   begin
  627.     Flags := PDF_FONT_SYMBOLIC +
  628.              PDF_FONT_FIXED_WIDTH;
  629.     AddNumberItem('Flags', Flags);
  630.     AddNumberItem('ItalicAngle', -11);
  631.     AddNumberItem('StemV', 78);
  632.   end;
  633. end;
  634.  
  635. // GetFontName
  636. function TPdfGothicItalic.GetFontName: string;
  637. begin
  638.   result := 'Gothic,Italic';
  639. end;
  640.  
  641. { TPdfGothicBoldItalic }
  642.  
  643. // AddDescriptorItem
  644. procedure TPdfGothicBoldItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  645. var
  646.   Flags: integer;
  647. begin
  648.   with AFontDescriptor do
  649.   begin
  650.     Flags := PDF_FONT_SYMBOLIC +
  651.              PDF_FONT_FIXED_WIDTH +
  652.              PDF_FONT_FOURCE_BOLD;
  653.     AddNumberItem('Flags', Flags);
  654.     AddNumberItem('ItalicAngle', -11);
  655.     AddNumberItem('StemV', 156);
  656.   end;
  657. end;
  658.  
  659. // GetFontName
  660. function TPdfGothicBoldItalic.GetFontName: string;
  661. begin
  662.   result := 'Gothic,BoldItalic';
  663. end;
  664.  
  665. { TPdfMincyo }
  666.  
  667. // AddDescriptorItem
  668. procedure TPdfMincyo.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  669. var
  670.   Flags: integer;
  671. begin
  672.   with AFontDescriptor do
  673.   begin
  674.     Flags := PDF_FONT_SYMBOLIC +
  675.              PDF_FONT_FIXED_WIDTH +
  676.              PDF_FONT_SERIF;
  677.     AddNumberItem('Flags', Flags);
  678.     AddNumberItem('ItalicAngle', 0);
  679.     AddNumberItem('StemV', 78);
  680.   end;
  681. end;
  682.  
  683. function TPdfMincyo.GetFontName: string;
  684. begin
  685.   result := 'Mincyo';
  686. end;
  687.  
  688. { TPdfMincyoBold }
  689.  
  690. // AddDescriptorItem
  691. procedure TPdfMincyoBold.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  692. var
  693.   Flags: integer;
  694. begin
  695.   with AFontDescriptor do
  696.   begin
  697.     Flags := PDF_FONT_SYMBOLIC +
  698.              PDF_FONT_FIXED_WIDTH +
  699.              PDF_FONT_FOURCE_BOLD +
  700.              PDF_FONT_SERIF;
  701.     AddNumberItem('Flags', Flags);
  702.     AddNumberItem('ItalicAngle', 0);
  703.     AddNumberItem('StemV', 156);
  704.   end;
  705. end;
  706.  
  707. // GetFontName
  708. function TPdfMincyoBold.GetFontName: string;
  709. begin
  710.   result := 'Mincyo,Bold';
  711. end;
  712.  
  713. { TPdfMincyoItalic }
  714.  
  715. // AddDescriptorItem
  716. procedure TPdfMincyoItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  717. var
  718.   Flags: integer;
  719. begin
  720.   with AFontDescriptor do
  721.   begin
  722.     Flags := PDF_FONT_SYMBOLIC +
  723.              PDF_FONT_FIXED_WIDTH +
  724.              PDF_FONT_SERIF;
  725.     AddNumberItem('Flags', Flags);
  726.     AddNumberItem('ItalicAngle', -11);
  727.     AddNumberItem('StemV', 78);
  728.   end;
  729. end;
  730.  
  731. // GetFontName
  732. function TPdfMincyoItalic.GetFontName: string;
  733. begin
  734.   result := 'Mincyo,Italic';
  735. end;
  736.  
  737. { TPdfMincyoBoldItalic }
  738.  
  739. // AddDescriptorItem
  740. procedure TPdfMincyoBoldItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  741. var
  742.   Flags: integer;
  743. begin
  744.   with AFontDescriptor do
  745.   begin
  746.     Flags := PDF_FONT_SYMBOLIC +
  747.              PDF_FONT_FIXED_WIDTH +
  748.              PDF_FONT_SERIF +
  749.              PDF_FONT_FOURCE_BOLD;
  750.     AddNumberItem('Flags', Flags);
  751.     AddNumberItem('ItalicAngle', -11);
  752.     AddNumberItem('StemV', 156);
  753.   end;
  754. end;
  755.  
  756. // GetFontName
  757. function TPdfMincyoBoldItalic.GetFontName: string;
  758. begin
  759.   result := 'Mincyo,BoldItalic';
  760. end;
  761.  
  762. { TPdfJpProportionalFont }
  763.  
  764. // Create
  765. constructor TPdfJpProportionalFont.Create(AXref: TPdfXref; AName: string);
  766. begin
  767.   inherited Create(AXref, AName);
  768.   AddStrElements(Data, TYPE0_JPP_FONT_STR_TABLE);
  769.   SetCharToCMap(@CharToCMap_90MSP_RKSJ_H);
  770. end;
  771.  
  772. { TPdfPGothic }
  773.  
  774. // AddDescendantFontItem
  775. procedure TPdfPGothic.AddDescendantFontItem(ADescendantFont: TPdfDictionary);
  776. var
  777.   FWidthsRoot: TPdfArray;
  778.   FWidths: TPdfArray;
  779. begin
  780.   FWidthsRoot := TPdfArray.CreateArray(nil);
  781.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(1));
  782.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY1);
  783.   FWidthsRoot.AddItem(FWidths);
  784.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(326));
  785.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY2);
  786.   FWidthsRoot.AddItem(FWidths);
  787.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(633));
  788.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY3);
  789.   FWidthsRoot.AddItem(FWidths);
  790.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(771));
  791.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY4);
  792.   FWidthsRoot.AddItem(FWidths);
  793.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(780));
  794.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY5);
  795.   FWidthsRoot.AddItem(FWidths);
  796.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(790));
  797.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY6);
  798.   FWidthsRoot.AddItem(FWidths);
  799.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(816));
  800.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY7);
  801.   FWidthsRoot.AddItem(FWidths);
  802.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(842));
  803.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY8);
  804.   FWidthsRoot.AddItem(FWidths);
  805.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(925));
  806.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY9);
  807.   FWidthsRoot.AddItem(FWidths);
  808.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(988));
  809.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY10);
  810.   FWidthsRoot.AddItem(FWidths);
  811.   ADescendantFont.AddItem('W', FWidthsRoot);
  812. end;
  813.  
  814. // AddDescriptorItem
  815. procedure TPdfPGothic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  816. var
  817.   Flags: integer;
  818. begin
  819.   with AFontDescriptor do
  820.   begin
  821.     Flags := PDF_FONT_SYMBOLIC;
  822.     AddNumberItem('Flags', Flags);
  823.     AddNumberItem('ItalicAngle', 0);
  824.     AddNumberItem('StemV', 78);
  825.   end;
  826. end;
  827.  
  828. // GetFontName
  829. function TPdfPGothic.GetFontName: string;
  830. begin
  831.   result := 'PGothic'
  832. end;
  833.  
  834. { TPdfPGothicBold }
  835.  
  836. // AddDescriptorItem
  837. procedure TPdfPGothicBold.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  838. var
  839.   Flags: integer;
  840. begin
  841.   with AFontDescriptor do
  842.   begin
  843.     Flags := PDF_FONT_SYMBOLIC + PDF_FONT_FOURCE_BOLD;
  844.     AddNumberItem('Flags', Flags);
  845.     AddNumberItem('ItalicAngle', 0);
  846.     AddNumberItem('StemV', 156);
  847.   end;
  848. end;
  849.  
  850. // GetFontName
  851. function TPdfPGothicBold.GetFontName: string;
  852. begin
  853.   result := 'PGothic,Bold'
  854. end;
  855.  
  856. { TPdfPGothicItalic }
  857.  
  858. // AddDescriptorItem
  859. procedure TPdfPGothicItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  860. var
  861.   Flags: integer;
  862. begin
  863.   with AFontDescriptor do
  864.   begin
  865.     Flags := PDF_FONT_SYMBOLIC;
  866.     AddNumberItem('Flags', Flags);
  867.     AddNumberItem('ItalicAngle', -11);
  868.     AddNumberItem('StemV', 78);
  869.   end;
  870. end;
  871.  
  872. // GetFontName
  873. function TPdfPGothicItalic.GetFontName: string;
  874. begin
  875.   result := 'PGothic,Italic'
  876. end;
  877.  
  878. { TPdfPGothicBoldItalic }
  879.  
  880. // AddDescriptorItem
  881. procedure TPdfPGothicBoldItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  882. var
  883.   Flags: integer;
  884. begin
  885.   with AFontDescriptor do
  886.   begin
  887.     Flags := PDF_FONT_SYMBOLIC + PDF_FONT_FOURCE_BOLD;
  888.     AddNumberItem('Flags', Flags);
  889.     AddNumberItem('ItalicAngle', -11);
  890.     AddNumberItem('StemV', 156);
  891.   end;
  892. end;
  893.  
  894. // GetFontName
  895. function TPdfPGothicBoldItalic.GetFontName: string;
  896. begin
  897.   result := 'PGothic,BoldItalic'
  898. end;
  899.  
  900. { TPdfPMincyo }
  901.  
  902. // AddDescendantFontItem
  903. procedure TPdfPMincyo.AddDescendantFontItem(ADescendantFont: TPdfDictionary);
  904. var
  905.   FWidthsRoot: TPdfArray;
  906.   FWidths: TPdfArray;
  907. begin
  908.   FWidthsRoot := TPdfArray.CreateArray(nil);
  909.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(1));
  910.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY1);
  911.   FWidthsRoot.AddItem(FWidths);
  912.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(326));
  913.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY2);
  914.   FWidthsRoot.AddItem(FWidths);
  915.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(633));
  916.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY3);
  917.   FWidthsRoot.AddItem(FWidths);
  918.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(771));
  919.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY4);
  920.   FWidthsRoot.AddItem(FWidths);
  921.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(780));
  922.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY5);
  923.   FWidthsRoot.AddItem(FWidths);
  924.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(790));
  925.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY6);
  926.   FWidthsRoot.AddItem(FWidths);
  927.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(816));
  928.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY7);
  929.   FWidthsRoot.AddItem(FWidths);
  930.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(842));
  931.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY8);
  932.   FWidthsRoot.AddItem(FWidths);
  933.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(925));
  934.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY9);
  935.   FWidthsRoot.AddItem(FWidths);
  936.   FWidthsRoot.AddItem(TPdfNumber.CreateNumber(988));
  937.   FWidths := TPdfArray.CreateNumArray(nil, PGOTHIC_FONT_WIDTH_ARRAY10);
  938.   FWidthsRoot.AddItem(FWidths);
  939.   ADescendantFont.AddItem('W', FWidthsRoot);
  940. end;
  941.  
  942. // AddDescriptorItem
  943. procedure TPdfPMincyo.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  944. var
  945.   Flags: integer;
  946. begin
  947.   with AFontDescriptor do
  948.   begin
  949.     Flags := PDF_FONT_SYMBOLIC + PDF_FONT_SERIF;
  950.     AddNumberItem('Flags', Flags);
  951.     AddNumberItem('ItalicAngle', 0);
  952.     AddNumberItem('StemV', 78);
  953.   end;
  954. end;
  955.  
  956. // GetFontName
  957. function TPdfPMincyo.GetFontName: string;
  958. begin
  959.   result := 'PMincyo'
  960. end;
  961.  
  962. { TPdfPMincyoBold }
  963.  
  964. // AddDescriptorItem
  965. procedure TPdfPMincyoBold.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  966. var
  967.   Flags: integer;
  968. begin
  969.   with AFontDescriptor do
  970.   begin
  971.     Flags := PDF_FONT_SYMBOLIC + PDF_FONT_SERIF + PDF_FONT_FOURCE_BOLD;
  972.     AddNumberItem('Flags', Flags);
  973.     AddNumberItem('ItalicAngle', 0);
  974.     AddNumberItem('StemV', 156);
  975.   end;
  976. end;
  977.  
  978. // GetFontName
  979. function TPdfPMincyoBold.GetFontName: string;
  980. begin
  981.   result := 'PMincyo,Bold'
  982. end;
  983.  
  984. { TPdfPMincyoItalic }
  985.  
  986. // AddDescriptorItem
  987. procedure TPdfPMincyoItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  988. var
  989.   Flags: integer;
  990. begin
  991.   with AFontDescriptor do
  992.   begin
  993.     Flags := PDF_FONT_SYMBOLIC + PDF_FONT_SERIF;
  994.     AddNumberItem('Flags', Flags);
  995.     AddNumberItem('ItalicAngle', -11);
  996.     AddNumberItem('StemV', 78);
  997.   end;
  998. end;
  999.  
  1000. // GetFontName
  1001. function TPdfPMincyoItalic.GetFontName: string;
  1002. begin
  1003.   result := 'PMincyo,Italic'
  1004. end;
  1005.  
  1006. { TPdfPMincyoBoldItalic }
  1007.  
  1008. // AddDescriptorItem
  1009. procedure TPdfPMincyoBoldItalic.AddDescriptorItem(AFontDescriptor: TPdfDictionary);
  1010. var
  1011.   Flags: integer;
  1012. begin
  1013.   with AFontDescriptor do
  1014.   begin
  1015.     Flags := PDF_FONT_SYMBOLIC + PDF_FONT_SERIF + PDF_FONT_FOURCE_BOLD;
  1016.     AddNumberItem('Flags', Flags);
  1017.     AddNumberItem('ItalicAngle', -11);
  1018.     AddNumberItem('StemV', 156);
  1019.   end;
  1020. end;
  1021.  
  1022. // GetFontName
  1023. function TPdfPMincyoBoldItalic.GetFontName: string;
  1024. begin
  1025.   result := 'PMincyo,BoldItalic'
  1026. end;
  1027.  
  1028. initialization
  1029.  
  1030.   RegisterClassAlias(TPdfGothic, 'Gothic');
  1031.   RegisterClassAlias(TPdfGothicBold, 'Gothic,Bold');
  1032.   RegisterClassAlias(TPdfGothicItalic, 'Gothic,Italic');
  1033.   RegisterClassAlias(TPdfGothicBoldItalic, 'Gothic,BoldItalic');
  1034.   RegisterClassAlias(TPdfMincyo, 'Mincyo');
  1035.   RegisterClassAlias(TPdfMincyoBold, 'Mincyo,Bold');
  1036.   RegisterClassAlias(TPdfMincyoItalic, 'Mincyo,Italic');
  1037.   RegisterClassAlias(TPdfMincyoBoldItalic, 'Mincyo,BoldItalic');
  1038.   RegisterClassAlias(TPdfPGothic, 'PGothic');
  1039.   RegisterClassAlias(TPdfPGothicBold, 'PGothic,Bold');
  1040.   RegisterClassAlias(TPdfPGothicItalic, 'PGothic,Italic');
  1041.   RegisterClassAlias(TPdfPGothicBoldItalic, 'PGothic,BoldItalic');
  1042.   RegisterClassAlias(TPdfPMincyo, 'PMincyo');
  1043.   RegisterClassAlias(TPdfPMincyoBold, 'PMincyo,Bold');
  1044.   RegisterClassAlias(TPdfPMincyoItalic, 'PMincyo,Italic');
  1045.   RegisterClassAlias(TPdfPMincyoBoldItalic, 'PMincyo,BoldItalic');
  1046.  
  1047. finalization
  1048.  
  1049.   UnRegisterClass(TPdfGothic);
  1050.   UnRegisterClass(TPdfGothicBold);
  1051.   UnRegisterClass(TPdfGothicItalic);
  1052.   UnRegisterClass(TPdfGothicBoldItalic);
  1053.   UnRegisterClass(TPdfMincyo);
  1054.   UnRegisterClass(TPdfMincyoBold);
  1055.   UnRegisterClass(TPdfMincyoItalic);
  1056.   UnRegisterClass(TPdfMincyoBoldItalic);
  1057.   UnRegisterClass(TPdfPGothic);
  1058.   UnRegisterClass(TPdfPGothicBold);
  1059.   UnRegisterClass(TPdfPGothicItalic);
  1060.   UnRegisterClass(TPdfPGothicBoldItalic);
  1061.   UnRegisterClass(TPdfPMincyo);
  1062.   UnRegisterClass(TPdfPMincyoBold);
  1063.   UnRegisterClass(TPdfPMincyoItalic);
  1064.   UnRegisterClass(TPdfPMincyoBoldItalic);
  1065.  
  1066. end.
  1067.