Merged revisions 682600,682604-682605,682616-682618,682625,682630,683136,683159,683684,684041,684491,684493,684575,684577 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
................
r682600 | jeremias | 2008-08-05 07:46:31 +0100 (Tue, 05 Aug 2008) | 8 lines
Blocked revisions 681371 via svnmerge
........
r681371 | jeremias | 2008-07-31 15:54:16 +0200 (Do, 31 Jul 2008) | 1 line
Adjust fop.bat to JAR upgrade.
........
................
r682604 | jeremias | 2008-08-05 07:51:32 +0100 (Tue, 05 Aug 2008) | 26 lines
Merged revisions 636407-637074,637076-637118,637120-637790,637792-637856,637858-637992,637994-638047,638049-638307,638309-638315,638318-638936,638938-640888,640890-642905,642907-647402,647404-647536,647538-648983,648985-649005,649007-649013,649015-650549,650551-651301,651303-653536,653538-654452,654454-656285,656287-656523,656525-657519,657521-661579,661581-663481,663483-664691,664693-666634,666636-666661,666663-668532,668535-668549,668551-668569,668571-668640,668642-669117,669119-669172,669174-669477,669479-670550,670552-673749,673751-674303,674305-674313,674315-674316,674318-675105,675107-675149,675153-675706,675708-680714,680716-680819,680821-681283,681285,681287-681289,681293-681370,681372-682601 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
........
r681309 | jeremias | 2008-07-31 11:31:35 +0200 (Do, 31 Jul 2008) | 2 lines
0.95beta -> 0.95
Added links to the new SVN mirror in the Netherlands.
........
r681314 | vhennebert | 2008-07-31 11:41:33 +0200 (Do, 31 Jul 2008) | 2 lines
Corrected bug number
........
r681329 | vhennebert | 2008-07-31 12:38:10 +0200 (Do, 31 Jul 2008) | 2 lines
Slight re-phrasing to make it clearer (I believe) that this page only lists changes made since 0.95beta, but that changes from that latter are of course also available in 0.95 final
........
r681330 | vhennebert | 2008-07-31 12:39:50 +0200 (Do, 31 Jul 2008) | 2 lines
Don't be shy Max ;-) Restored alphabetical order in the list of active committers
........
r681350 | jeremias | 2008-07-31 14:09:41 +0200 (Do, 31 Jul 2008) | 1 line
Fixed validation errors.
........
................
r682605 | jeremias | 2008-08-05 07:55:12 +0100 (Tue, 05 Aug 2008) | 3 lines
Removed merge tracking for "svnmerge" for
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
................
r682616 | jeremias | 2008-08-05 08:46:14 +0100 (Tue, 05 Aug 2008) | 1 line
Skip IO Exception when loading a PFM and an AFM could be loaded. The PFM is only a fallback and not necessary when the AFM is available. Motivation: The "URW Bookman L" fonts from GhostScript have bad PFM files.
................
r682617 | jeremias | 2008-08-05 08:47:18 +0100 (Tue, 05 Aug 2008) | 1 line
The FontEventListener was not wired into font auto-detection. An error while loading a font wasn't relayed to the event subsystem.
................
r682618 | jeremias | 2008-08-05 08:57:36 +0100 (Tue, 05 Aug 2008) | 1 line
Fixed small mistake with weight adjustment on font lookup. Weight 400 was slipping through the cracks.
................
r682625 | jeremias | 2008-08-05 09:12:25 +0100 (Tue, 05 Aug 2008) | 2 lines
Removed "Areas of expertise" as discussed.
News update for 0.95 release.
................
r682630 | jeremias | 2008-08-05 09:28:07 +0100 (Tue, 05 Aug 2008) | 1 line
Oopsy, that wasn't intended to get into trunk.
................
r683136 | jeremias | 2008-08-06 07:49:36 +0100 (Wed, 06 Aug 2008) | 1 line
Some missing release info.
................
r683159 | jeremias | 2008-08-06 09:24:53 +0100 (Wed, 06 Aug 2008) | 1 line
Converted the project news to a special XML format so I can generate an RSS feed. Mostly copied from XML Graphics Commons.
................
r683684 | jeremias | 2008-08-07 20:26:54 +0100 (Thu, 07 Aug 2008) | 1 line
Added fop.cmd to binary distribution (not sure if any of the others should be included, too)
................
r684041 | spepping | 2008-08-08 19:38:07 +0100 (Fri, 08 Aug 2008) | 2 lines
Added fop.js to binary distribution
................
r684491 | adelmelle | 2008-08-10 13:35:42 +0100 (Sun, 10 Aug 2008) | 1 line
Bugzilla 45490: Avoid altering the original 'href' if the protocol is other than 'file:' (suggested by Thomas Stieler)
................
r684493 | adelmelle | 2008-08-10 13:40:58 +0100 (Sun, 10 Aug 2008) | 1 line
Added 'due-to' to the wrong entry...
................
r684575 | jeremias | 2008-08-10 20:18:22 +0100 (Sun, 10 Aug 2008) | 2 lines
Merge from 0_95 branch:
Fixed ID resolution for nested bookmarks with duplicated IDs.
................
r684577 | jeremias | 2008-08-10 20:35:27 +0100 (Sun, 10 Aug 2008) | 3 lines
Bugzilla #45606:
Fixed generation of "fonttbl" for RTF output to fix loading problem with AbiWord.
Submitted by: Pavel Kysilka <goldenfish.at.linuxsoft.cz>
................
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@685487 13f79535-47bb-0310-9956-ffa450edef68
16 years ago Merged revisions 682600,682604-682605,682616-682618,682625,682630,683136,683159,683684,684041,684491,684493,684575,684577 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
................
r682600 | jeremias | 2008-08-05 07:46:31 +0100 (Tue, 05 Aug 2008) | 8 lines
Blocked revisions 681371 via svnmerge
........
r681371 | jeremias | 2008-07-31 15:54:16 +0200 (Do, 31 Jul 2008) | 1 line
Adjust fop.bat to JAR upgrade.
........
................
r682604 | jeremias | 2008-08-05 07:51:32 +0100 (Tue, 05 Aug 2008) | 26 lines
Merged revisions 636407-637074,637076-637118,637120-637790,637792-637856,637858-637992,637994-638047,638049-638307,638309-638315,638318-638936,638938-640888,640890-642905,642907-647402,647404-647536,647538-648983,648985-649005,649007-649013,649015-650549,650551-651301,651303-653536,653538-654452,654454-656285,656287-656523,656525-657519,657521-661579,661581-663481,663483-664691,664693-666634,666636-666661,666663-668532,668535-668549,668551-668569,668571-668640,668642-669117,669119-669172,669174-669477,669479-670550,670552-673749,673751-674303,674305-674313,674315-674316,674318-675105,675107-675149,675153-675706,675708-680714,680716-680819,680821-681283,681285,681287-681289,681293-681370,681372-682601 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
........
r681309 | jeremias | 2008-07-31 11:31:35 +0200 (Do, 31 Jul 2008) | 2 lines
0.95beta -> 0.95
Added links to the new SVN mirror in the Netherlands.
........
r681314 | vhennebert | 2008-07-31 11:41:33 +0200 (Do, 31 Jul 2008) | 2 lines
Corrected bug number
........
r681329 | vhennebert | 2008-07-31 12:38:10 +0200 (Do, 31 Jul 2008) | 2 lines
Slight re-phrasing to make it clearer (I believe) that this page only lists changes made since 0.95beta, but that changes from that latter are of course also available in 0.95 final
........
r681330 | vhennebert | 2008-07-31 12:39:50 +0200 (Do, 31 Jul 2008) | 2 lines
Don't be shy Max ;-) Restored alphabetical order in the list of active committers
........
r681350 | jeremias | 2008-07-31 14:09:41 +0200 (Do, 31 Jul 2008) | 1 line
Fixed validation errors.
........
................
r682605 | jeremias | 2008-08-05 07:55:12 +0100 (Tue, 05 Aug 2008) | 3 lines
Removed merge tracking for "svnmerge" for
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
................
r682616 | jeremias | 2008-08-05 08:46:14 +0100 (Tue, 05 Aug 2008) | 1 line
Skip IO Exception when loading a PFM and an AFM could be loaded. The PFM is only a fallback and not necessary when the AFM is available. Motivation: The "URW Bookman L" fonts from GhostScript have bad PFM files.
................
r682617 | jeremias | 2008-08-05 08:47:18 +0100 (Tue, 05 Aug 2008) | 1 line
The FontEventListener was not wired into font auto-detection. An error while loading a font wasn't relayed to the event subsystem.
................
r682618 | jeremias | 2008-08-05 08:57:36 +0100 (Tue, 05 Aug 2008) | 1 line
Fixed small mistake with weight adjustment on font lookup. Weight 400 was slipping through the cracks.
................
r682625 | jeremias | 2008-08-05 09:12:25 +0100 (Tue, 05 Aug 2008) | 2 lines
Removed "Areas of expertise" as discussed.
News update for 0.95 release.
................
r682630 | jeremias | 2008-08-05 09:28:07 +0100 (Tue, 05 Aug 2008) | 1 line
Oopsy, that wasn't intended to get into trunk.
................
r683136 | jeremias | 2008-08-06 07:49:36 +0100 (Wed, 06 Aug 2008) | 1 line
Some missing release info.
................
r683159 | jeremias | 2008-08-06 09:24:53 +0100 (Wed, 06 Aug 2008) | 1 line
Converted the project news to a special XML format so I can generate an RSS feed. Mostly copied from XML Graphics Commons.
................
r683684 | jeremias | 2008-08-07 20:26:54 +0100 (Thu, 07 Aug 2008) | 1 line
Added fop.cmd to binary distribution (not sure if any of the others should be included, too)
................
r684041 | spepping | 2008-08-08 19:38:07 +0100 (Fri, 08 Aug 2008) | 2 lines
Added fop.js to binary distribution
................
r684491 | adelmelle | 2008-08-10 13:35:42 +0100 (Sun, 10 Aug 2008) | 1 line
Bugzilla 45490: Avoid altering the original 'href' if the protocol is other than 'file:' (suggested by Thomas Stieler)
................
r684493 | adelmelle | 2008-08-10 13:40:58 +0100 (Sun, 10 Aug 2008) | 1 line
Added 'due-to' to the wrong entry...
................
r684575 | jeremias | 2008-08-10 20:18:22 +0100 (Sun, 10 Aug 2008) | 2 lines
Merge from 0_95 branch:
Fixed ID resolution for nested bookmarks with duplicated IDs.
................
r684577 | jeremias | 2008-08-10 20:35:27 +0100 (Sun, 10 Aug 2008) | 3 lines
Bugzilla #45606:
Fixed generation of "fonttbl" for RTF output to fix loading problem with AbiWord.
Submitted by: Pavel Kysilka <goldenfish.at.linuxsoft.cz>
................
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@685487 13f79535-47bb-0310-9956-ffa450edef68
16 years ago Merged revisions 682600,682604-682605,682616-682618,682625,682630,683136,683159,683684,684041,684491,684493,684575,684577 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
................
r682600 | jeremias | 2008-08-05 07:46:31 +0100 (Tue, 05 Aug 2008) | 8 lines
Blocked revisions 681371 via svnmerge
........
r681371 | jeremias | 2008-07-31 15:54:16 +0200 (Do, 31 Jul 2008) | 1 line
Adjust fop.bat to JAR upgrade.
........
................
r682604 | jeremias | 2008-08-05 07:51:32 +0100 (Tue, 05 Aug 2008) | 26 lines
Merged revisions 636407-637074,637076-637118,637120-637790,637792-637856,637858-637992,637994-638047,638049-638307,638309-638315,638318-638936,638938-640888,640890-642905,642907-647402,647404-647536,647538-648983,648985-649005,649007-649013,649015-650549,650551-651301,651303-653536,653538-654452,654454-656285,656287-656523,656525-657519,657521-661579,661581-663481,663483-664691,664693-666634,666636-666661,666663-668532,668535-668549,668551-668569,668571-668640,668642-669117,669119-669172,669174-669477,669479-670550,670552-673749,673751-674303,674305-674313,674315-674316,674318-675105,675107-675149,675153-675706,675708-680714,680716-680819,680821-681283,681285,681287-681289,681293-681370,681372-682601 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
........
r681309 | jeremias | 2008-07-31 11:31:35 +0200 (Do, 31 Jul 2008) | 2 lines
0.95beta -> 0.95
Added links to the new SVN mirror in the Netherlands.
........
r681314 | vhennebert | 2008-07-31 11:41:33 +0200 (Do, 31 Jul 2008) | 2 lines
Corrected bug number
........
r681329 | vhennebert | 2008-07-31 12:38:10 +0200 (Do, 31 Jul 2008) | 2 lines
Slight re-phrasing to make it clearer (I believe) that this page only lists changes made since 0.95beta, but that changes from that latter are of course also available in 0.95 final
........
r681330 | vhennebert | 2008-07-31 12:39:50 +0200 (Do, 31 Jul 2008) | 2 lines
Don't be shy Max ;-) Restored alphabetical order in the list of active committers
........
r681350 | jeremias | 2008-07-31 14:09:41 +0200 (Do, 31 Jul 2008) | 1 line
Fixed validation errors.
........
................
r682605 | jeremias | 2008-08-05 07:55:12 +0100 (Tue, 05 Aug 2008) | 3 lines
Removed merge tracking for "svnmerge" for
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
................
r682616 | jeremias | 2008-08-05 08:46:14 +0100 (Tue, 05 Aug 2008) | 1 line
Skip IO Exception when loading a PFM and an AFM could be loaded. The PFM is only a fallback and not necessary when the AFM is available. Motivation: The "URW Bookman L" fonts from GhostScript have bad PFM files.
................
r682617 | jeremias | 2008-08-05 08:47:18 +0100 (Tue, 05 Aug 2008) | 1 line
The FontEventListener was not wired into font auto-detection. An error while loading a font wasn't relayed to the event subsystem.
................
r682618 | jeremias | 2008-08-05 08:57:36 +0100 (Tue, 05 Aug 2008) | 1 line
Fixed small mistake with weight adjustment on font lookup. Weight 400 was slipping through the cracks.
................
r682625 | jeremias | 2008-08-05 09:12:25 +0100 (Tue, 05 Aug 2008) | 2 lines
Removed "Areas of expertise" as discussed.
News update for 0.95 release.
................
r682630 | jeremias | 2008-08-05 09:28:07 +0100 (Tue, 05 Aug 2008) | 1 line
Oopsy, that wasn't intended to get into trunk.
................
r683136 | jeremias | 2008-08-06 07:49:36 +0100 (Wed, 06 Aug 2008) | 1 line
Some missing release info.
................
r683159 | jeremias | 2008-08-06 09:24:53 +0100 (Wed, 06 Aug 2008) | 1 line
Converted the project news to a special XML format so I can generate an RSS feed. Mostly copied from XML Graphics Commons.
................
r683684 | jeremias | 2008-08-07 20:26:54 +0100 (Thu, 07 Aug 2008) | 1 line
Added fop.cmd to binary distribution (not sure if any of the others should be included, too)
................
r684041 | spepping | 2008-08-08 19:38:07 +0100 (Fri, 08 Aug 2008) | 2 lines
Added fop.js to binary distribution
................
r684491 | adelmelle | 2008-08-10 13:35:42 +0100 (Sun, 10 Aug 2008) | 1 line
Bugzilla 45490: Avoid altering the original 'href' if the protocol is other than 'file:' (suggested by Thomas Stieler)
................
r684493 | adelmelle | 2008-08-10 13:40:58 +0100 (Sun, 10 Aug 2008) | 1 line
Added 'due-to' to the wrong entry...
................
r684575 | jeremias | 2008-08-10 20:18:22 +0100 (Sun, 10 Aug 2008) | 2 lines
Merge from 0_95 branch:
Fixed ID resolution for nested bookmarks with duplicated IDs.
................
r684577 | jeremias | 2008-08-10 20:35:27 +0100 (Sun, 10 Aug 2008) | 3 lines
Bugzilla #45606:
Fixed generation of "fonttbl" for RTF output to fix loading problem with AbiWord.
Submitted by: Pavel Kysilka <goldenfish.at.linuxsoft.cz>
................
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@685487 13f79535-47bb-0310-9956-ffa450edef68
16 years ago Merged revisions 682600,682604-682605,682616-682618,682625,682630,683136,683159,683684,684041,684491,684493,684575,684577 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
................
r682600 | jeremias | 2008-08-05 07:46:31 +0100 (Tue, 05 Aug 2008) | 8 lines
Blocked revisions 681371 via svnmerge
........
r681371 | jeremias | 2008-07-31 15:54:16 +0200 (Do, 31 Jul 2008) | 1 line
Adjust fop.bat to JAR upgrade.
........
................
r682604 | jeremias | 2008-08-05 07:51:32 +0100 (Tue, 05 Aug 2008) | 26 lines
Merged revisions 636407-637074,637076-637118,637120-637790,637792-637856,637858-637992,637994-638047,638049-638307,638309-638315,638318-638936,638938-640888,640890-642905,642907-647402,647404-647536,647538-648983,648985-649005,649007-649013,649015-650549,650551-651301,651303-653536,653538-654452,654454-656285,656287-656523,656525-657519,657521-661579,661581-663481,663483-664691,664693-666634,666636-666661,666663-668532,668535-668549,668551-668569,668571-668640,668642-669117,669119-669172,669174-669477,669479-670550,670552-673749,673751-674303,674305-674313,674315-674316,674318-675105,675107-675149,675153-675706,675708-680714,680716-680819,680821-681283,681285,681287-681289,681293-681370,681372-682601 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
........
r681309 | jeremias | 2008-07-31 11:31:35 +0200 (Do, 31 Jul 2008) | 2 lines
0.95beta -> 0.95
Added links to the new SVN mirror in the Netherlands.
........
r681314 | vhennebert | 2008-07-31 11:41:33 +0200 (Do, 31 Jul 2008) | 2 lines
Corrected bug number
........
r681329 | vhennebert | 2008-07-31 12:38:10 +0200 (Do, 31 Jul 2008) | 2 lines
Slight re-phrasing to make it clearer (I believe) that this page only lists changes made since 0.95beta, but that changes from that latter are of course also available in 0.95 final
........
r681330 | vhennebert | 2008-07-31 12:39:50 +0200 (Do, 31 Jul 2008) | 2 lines
Don't be shy Max ;-) Restored alphabetical order in the list of active committers
........
r681350 | jeremias | 2008-07-31 14:09:41 +0200 (Do, 31 Jul 2008) | 1 line
Fixed validation errors.
........
................
r682605 | jeremias | 2008-08-05 07:55:12 +0100 (Tue, 05 Aug 2008) | 3 lines
Removed merge tracking for "svnmerge" for
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
................
r682616 | jeremias | 2008-08-05 08:46:14 +0100 (Tue, 05 Aug 2008) | 1 line
Skip IO Exception when loading a PFM and an AFM could be loaded. The PFM is only a fallback and not necessary when the AFM is available. Motivation: The "URW Bookman L" fonts from GhostScript have bad PFM files.
................
r682617 | jeremias | 2008-08-05 08:47:18 +0100 (Tue, 05 Aug 2008) | 1 line
The FontEventListener was not wired into font auto-detection. An error while loading a font wasn't relayed to the event subsystem.
................
r682618 | jeremias | 2008-08-05 08:57:36 +0100 (Tue, 05 Aug 2008) | 1 line
Fixed small mistake with weight adjustment on font lookup. Weight 400 was slipping through the cracks.
................
r682625 | jeremias | 2008-08-05 09:12:25 +0100 (Tue, 05 Aug 2008) | 2 lines
Removed "Areas of expertise" as discussed.
News update for 0.95 release.
................
r682630 | jeremias | 2008-08-05 09:28:07 +0100 (Tue, 05 Aug 2008) | 1 line
Oopsy, that wasn't intended to get into trunk.
................
r683136 | jeremias | 2008-08-06 07:49:36 +0100 (Wed, 06 Aug 2008) | 1 line
Some missing release info.
................
r683159 | jeremias | 2008-08-06 09:24:53 +0100 (Wed, 06 Aug 2008) | 1 line
Converted the project news to a special XML format so I can generate an RSS feed. Mostly copied from XML Graphics Commons.
................
r683684 | jeremias | 2008-08-07 20:26:54 +0100 (Thu, 07 Aug 2008) | 1 line
Added fop.cmd to binary distribution (not sure if any of the others should be included, too)
................
r684041 | spepping | 2008-08-08 19:38:07 +0100 (Fri, 08 Aug 2008) | 2 lines
Added fop.js to binary distribution
................
r684491 | adelmelle | 2008-08-10 13:35:42 +0100 (Sun, 10 Aug 2008) | 1 line
Bugzilla 45490: Avoid altering the original 'href' if the protocol is other than 'file:' (suggested by Thomas Stieler)
................
r684493 | adelmelle | 2008-08-10 13:40:58 +0100 (Sun, 10 Aug 2008) | 1 line
Added 'due-to' to the wrong entry...
................
r684575 | jeremias | 2008-08-10 20:18:22 +0100 (Sun, 10 Aug 2008) | 2 lines
Merge from 0_95 branch:
Fixed ID resolution for nested bookmarks with duplicated IDs.
................
r684577 | jeremias | 2008-08-10 20:35:27 +0100 (Sun, 10 Aug 2008) | 3 lines
Bugzilla #45606:
Fixed generation of "fonttbl" for RTF output to fix loading problem with AbiWord.
Submitted by: Pavel Kysilka <goldenfish.at.linuxsoft.cz>
................
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@685487 13f79535-47bb-0310-9956-ffa450edef68
16 years ago |
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
- /* $Id$ */
-
- package org.apache.fop.render.rtf.rtflib.rtfdoc;
-
- /*
- * This file is part of the RTF library of the FOP project, which was originally
- * created by Bertrand Delacretaz <bdelacretaz@codeconsult.ch> and by other
- * contributors to the jfor project (www.jfor.org), who agreed to donate jfor to
- * the FOP project.
- */
-
- import java.io.IOException;
- import java.util.Hashtable;
- import java.util.Vector;
-
- /**
- * RTF font table
- * @author Andreas Putz a.putz@skynamics.com
- */
- public final class RtfFontManager {
- //////////////////////////////////////////////////
- // @@ Members
- //////////////////////////////////////////////////
-
- /** Singelton instance */
- private static RtfFontManager instance = null;
-
- /** Index table for the fonts */
- private Hashtable fontIndex = null;
- /** Used fonts to this vector */
- private Vector fontTable = null;
-
-
- //////////////////////////////////////////////////
- // @@ Construction
- //////////////////////////////////////////////////
-
- /**
- * Constructor.
- */
- private RtfFontManager () {
- fontTable = new Vector ();
- fontIndex = new Hashtable ();
-
- init ();
- }
-
- /**
- * Singelton.
- *
- * @return The instance of RtfFontManager
- */
- public static RtfFontManager getInstance () {
- if (instance == null) {
- instance = new RtfFontManager ();
- }
-
- return instance;
- }
-
-
- //////////////////////////////////////////////////
- // @@ Initializing
- //////////////////////////////////////////////////
-
- /**
- * Initialize the font table.
- */
- private void init () {
-
- // getFontNumber ("Helvetica");
- //Chanded by R.Marra default font Arial
- getFontNumber ("Arial");
- getFontNumber ("Symbol"); // used by RtfListItem.java
- getFontNumber ("Times New Roman");
-
- /*
- {\\f0\\fswiss Helv;}
-
- // f1 is used by RtfList and RtfListItem for bullets
-
- {\\f1\\froman\\fcharset2 Symbol;}
- {\\f2\\froman\\fprq2 Times New Roman;}
- {\\f3\\froman Times New Roman;}
- */
- }
-
-
- //////////////////////////////////////////////////
- // @@ Public methods
- //////////////////////////////////////////////////
-
-
- /**
- * Gets the number of font in the font table
- *
- * @param family Font family name ('Helvetica')
- *
- * @return The number of the font in the table
- */
- public int getFontNumber (String family) {
-
- Object o = fontIndex.get(getFontKey(family));
- int retVal;
-
- if (o == null) {
- addFont (family);
-
- retVal = fontTable.size() - 1;
- } else {
- retVal = ((Integer)o).intValue();
- }
-
- return retVal;
- }
-
- /**
- * Writes the font table in the header.
- *
- * @param header The header container to write in
- *
- * @throws IOException On error
- */
- public void writeFonts (RtfHeader header) throws IOException {
- if (fontTable == null || fontTable.size () == 0) {
- return;
- }
-
- header.newLine();
- header.writeGroupMark(true);
- header.writeControlWord("fonttbl");
-
- int len = fontTable.size ();
-
- for (int i = 0; i < len; i++) {
- header.writeGroupMark(true);
- header.newLine();
- header.write("\\f" + i);
- header.write(" " + (String) fontTable.elementAt (i));
- header.write(";");
- header.writeGroupMark(false);
- }
-
- header.newLine();
- header.writeGroupMark(false);
- }
-
-
- //////////////////////////////////////////////////
- // @@ Private methods
- //////////////////////////////////////////////////
-
- private String getFontKey(String family) {
- return family.toLowerCase();
- }
-
- /**
- * Adds a font to the table.
- *
- * @param family Identifier of font
- */
- private void addFont(String family) {
- fontIndex.put(getFontKey(family), new Integer(fontTable.size()));
- fontTable.addElement(family);
- }
- }
|