Files
libreoffice/vcl/inc/fontmanager.hxx

544 lines
21 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes (at least) relevant parts of: linecap: Reintegrating finished LineCap feature Patch contributed by Regina Henschel http://svn.apache.org/viewvc?view=revision&revision=1232507 Patches contributed by Sven Jacobi impress212: #i81610# fixed animation export http://svn.apache.org/viewvc?view=revision&revision=1167620 impress212: drawinglayer gbuild environment changes http://svn.apache.org/viewvc?view=revision&revision=1167627 http://svn.apache.org/viewvc?view=revision&revision=1167628 impress212: DffPropSet -> minor code improvements, removing table http://svn.apache.org/viewvc?view=revision&revision=1167634 impress212: #158494# fixed excel import (text rotation) http://svn.apache.org/viewvc?view=revision&revision=1167638 Patches contributed by Armin Le Grand Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement http://svn.apache.org/viewvc?view=revision&revision=1220836 #118728# changed indentifying definitions for Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1229961 #118838# LineGeometry creation for complicated cases optimized to create single Polygons http://svn.apache.org/viewvc?view=revision&revision=1236232 #119176# corrected file type detection for SVG for svg files without xml header http://svn.apache.org/viewvc?view=revision&revision=1309445 #118728# Extended Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1230531 #118529# solve break converters and convert commands for OLEs and images http://svn.apache.org/viewvc?view=revision&revision=1186168 svg: added WaE changes from branch svgreplacement to trunc http://svn.apache.org/viewvc?view=revision&revision=1222974 svg: corrected missing member initialization http://svn.apache.org/viewvc?view=revision&revision=1226134 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles to bitmapEx ... http://svn.apache.org/viewvc?view=revision&revision=1293316 fix for #118525#: removed no longer used variable maOriginalMapMode, one more exception eliminated http://svn.apache.org/viewvc?view=revision&revision=1227097 #16758# Added buffering to the VDev usages of the VclProcessor2D derivates... http://svn.apache.org/viewvc?view=revision&revision=1229521 #116758# Secured VDev buffer device to Vcl deinit http://svn.apache.org/viewvc?view=revision&revision=1230574 #116758# added remembering allocated VDevs for VDevBuffer to be able to also delete these when vcl goes down; it should never happen, but You never know http://svn.apache.org/viewvc?view=revision&revision=1230927 #118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive representation instead of TransparencePrimitive2D http://svn.apache.org/viewvc?view=revision&revision=1231198 #118822# secured 3D geometry creation (slices) by subdividing the 2D source polyPolygon early http://svn.apache.org/viewvc?view=revision&revision=1234749 #118829# enhanced Svg gradient quality, obstacles avoided http://svn.apache.org/viewvc?view=revision&revision=1235361 #118834# Unified usage of TextBreakupHelper as single tooling class for i18n text primitive breakup http://svn.apache.org/viewvc?view=revision&revision=1236110 #118853# added square pixel size limit to conversion of TransparencePrimitive2D to Metafile action http://svn.apache.org/viewvc?view=revision&revision=1237656 #118824# coreccted mirroring and boundrect when the graphicmanager is used for bitmap output http://svn.apache.org/viewvc?view=revision&revision=1240097 #115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for various optimization scenarios http://svn.apache.org/viewvc?view=revision&revision=1241434 #118783# Corrected errors in ID strings, corrected Svg line/fill export, corrected polygon close state http://svn.apache.org/viewvc?view=revision&revision=1232006 #118796# corrected null-pointer usage in SVG text exporter http://svn.apache.org/viewvc?view=revision&revision=1240262 #118729# Use GraphicStreamUrl and GraphicUrl to allow multi image import with linked graphics, too http://svn.apache.org/viewvc?view=revision&revision=1229962 #118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction http://svn.apache.org/viewvc?view=revision&revision=1293349 #118855# Corrected handling of possibly created empty clipRegions after PolyPolygon clipping http://svn.apache.org/viewvc?view=revision&revision=1237725 #115962# Better (but not yet optimal, see comments in task) handling of MetaFloatTransparentAction in PDF export http://svn.apache.org/viewvc?view=revision&revision=1241078 IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ... http://svn.apache.org/viewvc?view=revision&revision=1200879 118779# Added svg content streaming in/out to ImpGraphic stream operators http://svn.apache.org/viewvc?view=revision&revision=1231908 linecap: correctons for WaE and mac drawing http://svn.apache.org/viewvc?view=revision&revision=1232793 svg: uses current system Dpi for Svg replacement image creation http://svn.apache.org/viewvc?view=revision&revision=1233948 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1394326 Remove duplicate header includes. cws mba34issues01: #i117720#: convert assertion into warning http://svn.apache.org/viewvc?view=revision&revision=1172352 118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand. http://svn.apache.org/viewvc?view=revision&revision=1182166 cws mba34issues01: #i117714#: remove assertion http://svn.apache.org/viewvc?view=revision&revision=1172357 Patch contributed by Jurgen Schmidt add some additional checks to ensure proper reading operations http://svn.apache.org/viewvc?view=revision&revision=1209022 mostly prefer our stream / bounds checking work. Patches contributed by Herbert Duerr #i118816# add clarifying comment regarding Font::*Color*() methods http://svn.apache.org/viewvc?view=revision&revision=1233833 extend macro->string handling for empty strings http://svn.apache.org/viewvc?view=revision&revision=1175801 avoid magic constants for SALCOLOR_NONE http://svn.apache.org/viewvc?view=revision&revision=1177543 initialize slant properly in ImplFontMetricData constructor (author=iorsh) http://svn.apache.org/viewvc?view=revision&revision=1177551 #i118675# make check for extension updates more stable http://svn.apache.org/viewvc?view=revision&revision=1214797 #a118617# remove VBasicEventListener.dll binary There are no known users depending on its CLSID http://svn.apache.org/viewvc?view=revision&revision=1203697 Patches contributed by Ariel Constenla-Haile Fix build breaker on Linux/gcc http://svn.apache.org/viewvc?view=revision&revision=1221104 Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG http://svn.apache.org/viewvc?view=revision&revision=1215559 Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider instances of <SwFlyDrawObj> http://svn.apache.org/viewvc?view=revision&revision=1172120 sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 gnumake4 work variously from Hans-Joachim Lankenau http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1396782 http://svn.apache.org/viewvc?view=revision&revision=1394707 plus some amount of re-splitting of legacy headers. Patch contributed by Pavel Janik WaE: Remove unused variables. http://svn.apache.org/viewvc?view=revision&revision=1230697 Patches contributed by Takashi Ono mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 Patch contributed by Christian Lippka impress212: #i98044# re enable Text menu for outline and title shapes http://svn.apache.org/viewvc?view=revision&revision=1167639 Patch contributed by Andre Fischer 118674: Made category B code optional and disabled by default. http://svn.apache.org/viewvc?view=revision&revision=1215131 118881: Ignore empty paragraphs after bullets. http://svn.apache.org/viewvc?view=revision&revision=1296205 Patches contributed by Philipp Lohmann ooo340fixes: #i117780# use rtl allocator http://svn.apache.org/viewvc?view=revision&revision=1172087 ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header) http://svn.apache.org/viewvc?view=revision&revision=1167576 various cleanups, related compilation fixes, warning cleanups, re-working of obsolete stl template pieces to use boost instead, changed string classes, re-adapt KDE about data, about dialog, fixing warnings, and other fixes & improvements. Disable svg import / render for about/ branding code-paths for now. Restore full icon theme set. Remove OS/2 conditionals and sources. Remove conflicting gtk/full-screen monitors support. Retain existing svg rasterizer files - temporarily disabled. Standardize stringificaiton and fixup dllpostfix issues. Rename SvgGradientHelper::== to equalTo to avoid overloading issues. Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
/*
* This file is part of the LibreOffice project.
2001-05-08 10:46:10 +00:00
*
re-base on ALv2 code. Includes (at least) relevant parts of: linecap: Reintegrating finished LineCap feature Patch contributed by Regina Henschel http://svn.apache.org/viewvc?view=revision&revision=1232507 Patches contributed by Sven Jacobi impress212: #i81610# fixed animation export http://svn.apache.org/viewvc?view=revision&revision=1167620 impress212: drawinglayer gbuild environment changes http://svn.apache.org/viewvc?view=revision&revision=1167627 http://svn.apache.org/viewvc?view=revision&revision=1167628 impress212: DffPropSet -> minor code improvements, removing table http://svn.apache.org/viewvc?view=revision&revision=1167634 impress212: #158494# fixed excel import (text rotation) http://svn.apache.org/viewvc?view=revision&revision=1167638 Patches contributed by Armin Le Grand Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement http://svn.apache.org/viewvc?view=revision&revision=1220836 #118728# changed indentifying definitions for Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1229961 #118838# LineGeometry creation for complicated cases optimized to create single Polygons http://svn.apache.org/viewvc?view=revision&revision=1236232 #119176# corrected file type detection for SVG for svg files without xml header http://svn.apache.org/viewvc?view=revision&revision=1309445 #118728# Extended Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1230531 #118529# solve break converters and convert commands for OLEs and images http://svn.apache.org/viewvc?view=revision&revision=1186168 svg: added WaE changes from branch svgreplacement to trunc http://svn.apache.org/viewvc?view=revision&revision=1222974 svg: corrected missing member initialization http://svn.apache.org/viewvc?view=revision&revision=1226134 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles to bitmapEx ... http://svn.apache.org/viewvc?view=revision&revision=1293316 fix for #118525#: removed no longer used variable maOriginalMapMode, one more exception eliminated http://svn.apache.org/viewvc?view=revision&revision=1227097 #16758# Added buffering to the VDev usages of the VclProcessor2D derivates... http://svn.apache.org/viewvc?view=revision&revision=1229521 #116758# Secured VDev buffer device to Vcl deinit http://svn.apache.org/viewvc?view=revision&revision=1230574 #116758# added remembering allocated VDevs for VDevBuffer to be able to also delete these when vcl goes down; it should never happen, but You never know http://svn.apache.org/viewvc?view=revision&revision=1230927 #118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive representation instead of TransparencePrimitive2D http://svn.apache.org/viewvc?view=revision&revision=1231198 #118822# secured 3D geometry creation (slices) by subdividing the 2D source polyPolygon early http://svn.apache.org/viewvc?view=revision&revision=1234749 #118829# enhanced Svg gradient quality, obstacles avoided http://svn.apache.org/viewvc?view=revision&revision=1235361 #118834# Unified usage of TextBreakupHelper as single tooling class for i18n text primitive breakup http://svn.apache.org/viewvc?view=revision&revision=1236110 #118853# added square pixel size limit to conversion of TransparencePrimitive2D to Metafile action http://svn.apache.org/viewvc?view=revision&revision=1237656 #118824# coreccted mirroring and boundrect when the graphicmanager is used for bitmap output http://svn.apache.org/viewvc?view=revision&revision=1240097 #115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for various optimization scenarios http://svn.apache.org/viewvc?view=revision&revision=1241434 #118783# Corrected errors in ID strings, corrected Svg line/fill export, corrected polygon close state http://svn.apache.org/viewvc?view=revision&revision=1232006 #118796# corrected null-pointer usage in SVG text exporter http://svn.apache.org/viewvc?view=revision&revision=1240262 #118729# Use GraphicStreamUrl and GraphicUrl to allow multi image import with linked graphics, too http://svn.apache.org/viewvc?view=revision&revision=1229962 #118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction http://svn.apache.org/viewvc?view=revision&revision=1293349 #118855# Corrected handling of possibly created empty clipRegions after PolyPolygon clipping http://svn.apache.org/viewvc?view=revision&revision=1237725 #115962# Better (but not yet optimal, see comments in task) handling of MetaFloatTransparentAction in PDF export http://svn.apache.org/viewvc?view=revision&revision=1241078 IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ... http://svn.apache.org/viewvc?view=revision&revision=1200879 118779# Added svg content streaming in/out to ImpGraphic stream operators http://svn.apache.org/viewvc?view=revision&revision=1231908 linecap: correctons for WaE and mac drawing http://svn.apache.org/viewvc?view=revision&revision=1232793 svg: uses current system Dpi for Svg replacement image creation http://svn.apache.org/viewvc?view=revision&revision=1233948 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1394326 Remove duplicate header includes. cws mba34issues01: #i117720#: convert assertion into warning http://svn.apache.org/viewvc?view=revision&revision=1172352 118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand. http://svn.apache.org/viewvc?view=revision&revision=1182166 cws mba34issues01: #i117714#: remove assertion http://svn.apache.org/viewvc?view=revision&revision=1172357 Patch contributed by Jurgen Schmidt add some additional checks to ensure proper reading operations http://svn.apache.org/viewvc?view=revision&revision=1209022 mostly prefer our stream / bounds checking work. Patches contributed by Herbert Duerr #i118816# add clarifying comment regarding Font::*Color*() methods http://svn.apache.org/viewvc?view=revision&revision=1233833 extend macro->string handling for empty strings http://svn.apache.org/viewvc?view=revision&revision=1175801 avoid magic constants for SALCOLOR_NONE http://svn.apache.org/viewvc?view=revision&revision=1177543 initialize slant properly in ImplFontMetricData constructor (author=iorsh) http://svn.apache.org/viewvc?view=revision&revision=1177551 #i118675# make check for extension updates more stable http://svn.apache.org/viewvc?view=revision&revision=1214797 #a118617# remove VBasicEventListener.dll binary There are no known users depending on its CLSID http://svn.apache.org/viewvc?view=revision&revision=1203697 Patches contributed by Ariel Constenla-Haile Fix build breaker on Linux/gcc http://svn.apache.org/viewvc?view=revision&revision=1221104 Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG http://svn.apache.org/viewvc?view=revision&revision=1215559 Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider instances of <SwFlyDrawObj> http://svn.apache.org/viewvc?view=revision&revision=1172120 sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 gnumake4 work variously from Hans-Joachim Lankenau http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1396782 http://svn.apache.org/viewvc?view=revision&revision=1394707 plus some amount of re-splitting of legacy headers. Patch contributed by Pavel Janik WaE: Remove unused variables. http://svn.apache.org/viewvc?view=revision&revision=1230697 Patches contributed by Takashi Ono mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 Patch contributed by Christian Lippka impress212: #i98044# re enable Text menu for outline and title shapes http://svn.apache.org/viewvc?view=revision&revision=1167639 Patch contributed by Andre Fischer 118674: Made category B code optional and disabled by default. http://svn.apache.org/viewvc?view=revision&revision=1215131 118881: Ignore empty paragraphs after bullets. http://svn.apache.org/viewvc?view=revision&revision=1296205 Patches contributed by Philipp Lohmann ooo340fixes: #i117780# use rtl allocator http://svn.apache.org/viewvc?view=revision&revision=1172087 ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header) http://svn.apache.org/viewvc?view=revision&revision=1167576 various cleanups, related compilation fixes, warning cleanups, re-working of obsolete stl template pieces to use boost instead, changed string classes, re-adapt KDE about data, about dialog, fixing warnings, and other fixes & improvements. Disable svg import / render for about/ branding code-paths for now. Restore full icon theme set. Remove OS/2 conditionals and sources. Remove conflicting gtk/full-screen monitors support. Retain existing svg rasterizer files - temporarily disabled. Standardize stringificaiton and fixup dllpostfix issues. Rename SvgGradientHelper::== to equalTo to avoid overloading issues. Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
2001-05-08 10:46:10 +00:00
*
re-base on ALv2 code. Includes (at least) relevant parts of: linecap: Reintegrating finished LineCap feature Patch contributed by Regina Henschel http://svn.apache.org/viewvc?view=revision&revision=1232507 Patches contributed by Sven Jacobi impress212: #i81610# fixed animation export http://svn.apache.org/viewvc?view=revision&revision=1167620 impress212: drawinglayer gbuild environment changes http://svn.apache.org/viewvc?view=revision&revision=1167627 http://svn.apache.org/viewvc?view=revision&revision=1167628 impress212: DffPropSet -> minor code improvements, removing table http://svn.apache.org/viewvc?view=revision&revision=1167634 impress212: #158494# fixed excel import (text rotation) http://svn.apache.org/viewvc?view=revision&revision=1167638 Patches contributed by Armin Le Grand Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement http://svn.apache.org/viewvc?view=revision&revision=1220836 #118728# changed indentifying definitions for Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1229961 #118838# LineGeometry creation for complicated cases optimized to create single Polygons http://svn.apache.org/viewvc?view=revision&revision=1236232 #119176# corrected file type detection for SVG for svg files without xml header http://svn.apache.org/viewvc?view=revision&revision=1309445 #118728# Extended Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1230531 #118529# solve break converters and convert commands for OLEs and images http://svn.apache.org/viewvc?view=revision&revision=1186168 svg: added WaE changes from branch svgreplacement to trunc http://svn.apache.org/viewvc?view=revision&revision=1222974 svg: corrected missing member initialization http://svn.apache.org/viewvc?view=revision&revision=1226134 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles to bitmapEx ... http://svn.apache.org/viewvc?view=revision&revision=1293316 fix for #118525#: removed no longer used variable maOriginalMapMode, one more exception eliminated http://svn.apache.org/viewvc?view=revision&revision=1227097 #16758# Added buffering to the VDev usages of the VclProcessor2D derivates... http://svn.apache.org/viewvc?view=revision&revision=1229521 #116758# Secured VDev buffer device to Vcl deinit http://svn.apache.org/viewvc?view=revision&revision=1230574 #116758# added remembering allocated VDevs for VDevBuffer to be able to also delete these when vcl goes down; it should never happen, but You never know http://svn.apache.org/viewvc?view=revision&revision=1230927 #118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive representation instead of TransparencePrimitive2D http://svn.apache.org/viewvc?view=revision&revision=1231198 #118822# secured 3D geometry creation (slices) by subdividing the 2D source polyPolygon early http://svn.apache.org/viewvc?view=revision&revision=1234749 #118829# enhanced Svg gradient quality, obstacles avoided http://svn.apache.org/viewvc?view=revision&revision=1235361 #118834# Unified usage of TextBreakupHelper as single tooling class for i18n text primitive breakup http://svn.apache.org/viewvc?view=revision&revision=1236110 #118853# added square pixel size limit to conversion of TransparencePrimitive2D to Metafile action http://svn.apache.org/viewvc?view=revision&revision=1237656 #118824# coreccted mirroring and boundrect when the graphicmanager is used for bitmap output http://svn.apache.org/viewvc?view=revision&revision=1240097 #115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for various optimization scenarios http://svn.apache.org/viewvc?view=revision&revision=1241434 #118783# Corrected errors in ID strings, corrected Svg line/fill export, corrected polygon close state http://svn.apache.org/viewvc?view=revision&revision=1232006 #118796# corrected null-pointer usage in SVG text exporter http://svn.apache.org/viewvc?view=revision&revision=1240262 #118729# Use GraphicStreamUrl and GraphicUrl to allow multi image import with linked graphics, too http://svn.apache.org/viewvc?view=revision&revision=1229962 #118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction http://svn.apache.org/viewvc?view=revision&revision=1293349 #118855# Corrected handling of possibly created empty clipRegions after PolyPolygon clipping http://svn.apache.org/viewvc?view=revision&revision=1237725 #115962# Better (but not yet optimal, see comments in task) handling of MetaFloatTransparentAction in PDF export http://svn.apache.org/viewvc?view=revision&revision=1241078 IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ... http://svn.apache.org/viewvc?view=revision&revision=1200879 118779# Added svg content streaming in/out to ImpGraphic stream operators http://svn.apache.org/viewvc?view=revision&revision=1231908 linecap: correctons for WaE and mac drawing http://svn.apache.org/viewvc?view=revision&revision=1232793 svg: uses current system Dpi for Svg replacement image creation http://svn.apache.org/viewvc?view=revision&revision=1233948 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1394326 Remove duplicate header includes. cws mba34issues01: #i117720#: convert assertion into warning http://svn.apache.org/viewvc?view=revision&revision=1172352 118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand. http://svn.apache.org/viewvc?view=revision&revision=1182166 cws mba34issues01: #i117714#: remove assertion http://svn.apache.org/viewvc?view=revision&revision=1172357 Patch contributed by Jurgen Schmidt add some additional checks to ensure proper reading operations http://svn.apache.org/viewvc?view=revision&revision=1209022 mostly prefer our stream / bounds checking work. Patches contributed by Herbert Duerr #i118816# add clarifying comment regarding Font::*Color*() methods http://svn.apache.org/viewvc?view=revision&revision=1233833 extend macro->string handling for empty strings http://svn.apache.org/viewvc?view=revision&revision=1175801 avoid magic constants for SALCOLOR_NONE http://svn.apache.org/viewvc?view=revision&revision=1177543 initialize slant properly in ImplFontMetricData constructor (author=iorsh) http://svn.apache.org/viewvc?view=revision&revision=1177551 #i118675# make check for extension updates more stable http://svn.apache.org/viewvc?view=revision&revision=1214797 #a118617# remove VBasicEventListener.dll binary There are no known users depending on its CLSID http://svn.apache.org/viewvc?view=revision&revision=1203697 Patches contributed by Ariel Constenla-Haile Fix build breaker on Linux/gcc http://svn.apache.org/viewvc?view=revision&revision=1221104 Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG http://svn.apache.org/viewvc?view=revision&revision=1215559 Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider instances of <SwFlyDrawObj> http://svn.apache.org/viewvc?view=revision&revision=1172120 sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 gnumake4 work variously from Hans-Joachim Lankenau http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1396782 http://svn.apache.org/viewvc?view=revision&revision=1394707 plus some amount of re-splitting of legacy headers. Patch contributed by Pavel Janik WaE: Remove unused variables. http://svn.apache.org/viewvc?view=revision&revision=1230697 Patches contributed by Takashi Ono mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 Patch contributed by Christian Lippka impress212: #i98044# re enable Text menu for outline and title shapes http://svn.apache.org/viewvc?view=revision&revision=1167639 Patch contributed by Andre Fischer 118674: Made category B code optional and disabled by default. http://svn.apache.org/viewvc?view=revision&revision=1215131 118881: Ignore empty paragraphs after bullets. http://svn.apache.org/viewvc?view=revision&revision=1296205 Patches contributed by Philipp Lohmann ooo340fixes: #i117780# use rtl allocator http://svn.apache.org/viewvc?view=revision&revision=1172087 ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header) http://svn.apache.org/viewvc?view=revision&revision=1167576 various cleanups, related compilation fixes, warning cleanups, re-working of obsolete stl template pieces to use boost instead, changed string classes, re-adapt KDE about data, about dialog, fixing warnings, and other fixes & improvements. Disable svg import / render for about/ branding code-paths for now. Restore full icon theme set. Remove OS/2 conditionals and sources. Remove conflicting gtk/full-screen monitors support. Retain existing svg rasterizer files - temporarily disabled. Standardize stringificaiton and fixup dllpostfix issues. Rename SvgGradientHelper::== to equalTo to avoid overloading issues. Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
* This file incorporates work covered by the following license notice:
2001-05-08 10:46:10 +00:00
*
re-base on ALv2 code. Includes (at least) relevant parts of: linecap: Reintegrating finished LineCap feature Patch contributed by Regina Henschel http://svn.apache.org/viewvc?view=revision&revision=1232507 Patches contributed by Sven Jacobi impress212: #i81610# fixed animation export http://svn.apache.org/viewvc?view=revision&revision=1167620 impress212: drawinglayer gbuild environment changes http://svn.apache.org/viewvc?view=revision&revision=1167627 http://svn.apache.org/viewvc?view=revision&revision=1167628 impress212: DffPropSet -> minor code improvements, removing table http://svn.apache.org/viewvc?view=revision&revision=1167634 impress212: #158494# fixed excel import (text rotation) http://svn.apache.org/viewvc?view=revision&revision=1167638 Patches contributed by Armin Le Grand Svg: Reintegrated Svg replacement from /branches/alg/svgreplavement http://svn.apache.org/viewvc?view=revision&revision=1220836 #118728# changed indentifying definitions for Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1229961 #118838# LineGeometry creation for complicated cases optimized to create single Polygons http://svn.apache.org/viewvc?view=revision&revision=1236232 #119176# corrected file type detection for SVG for svg files without xml header http://svn.apache.org/viewvc?view=revision&revision=1309445 #118728# Extended Svg file detection http://svn.apache.org/viewvc?view=revision&revision=1230531 #118529# solve break converters and convert commands for OLEs and images http://svn.apache.org/viewvc?view=revision&revision=1186168 svg: added WaE changes from branch svgreplacement to trunc http://svn.apache.org/viewvc?view=revision&revision=1222974 svg: corrected missing member initialization http://svn.apache.org/viewvc?view=revision&revision=1226134 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles to bitmapEx ... http://svn.apache.org/viewvc?view=revision&revision=1293316 fix for #118525#: removed no longer used variable maOriginalMapMode, one more exception eliminated http://svn.apache.org/viewvc?view=revision&revision=1227097 #16758# Added buffering to the VDev usages of the VclProcessor2D derivates... http://svn.apache.org/viewvc?view=revision&revision=1229521 #116758# Secured VDev buffer device to Vcl deinit http://svn.apache.org/viewvc?view=revision&revision=1230574 #116758# added remembering allocated VDevs for VDevBuffer to be able to also delete these when vcl goes down; it should never happen, but You never know http://svn.apache.org/viewvc?view=revision&revision=1230927 #118730# Changed SvgClipPathNode to use MaskPrimitive2D for primitive representation instead of TransparencePrimitive2D http://svn.apache.org/viewvc?view=revision&revision=1231198 #118822# secured 3D geometry creation (slices) by subdividing the 2D source polyPolygon early http://svn.apache.org/viewvc?view=revision&revision=1234749 #118829# enhanced Svg gradient quality, obstacles avoided http://svn.apache.org/viewvc?view=revision&revision=1235361 #118834# Unified usage of TextBreakupHelper as single tooling class for i18n text primitive breakup http://svn.apache.org/viewvc?view=revision&revision=1236110 #118853# added square pixel size limit to conversion of TransparencePrimitive2D to Metafile action http://svn.apache.org/viewvc?view=revision&revision=1237656 #118824# coreccted mirroring and boundrect when the graphicmanager is used for bitmap output http://svn.apache.org/viewvc?view=revision&revision=1240097 #115092# Corrected VclProcessor2D::RenderPolygonStrokePrimitive2D for various optimization scenarios http://svn.apache.org/viewvc?view=revision&revision=1241434 #118783# Corrected errors in ID strings, corrected Svg line/fill export, corrected polygon close state http://svn.apache.org/viewvc?view=revision&revision=1232006 #118796# corrected null-pointer usage in SVG text exporter http://svn.apache.org/viewvc?view=revision&revision=1240262 #118729# Use GraphicStreamUrl and GraphicUrl to allow multi image import with linked graphics, too http://svn.apache.org/viewvc?view=revision&revision=1229962 #118898# corrected error in GDIMetaFile::GetBoundRect in handling MetaFloatTransparentAction http://svn.apache.org/viewvc?view=revision&revision=1293349 #118855# Corrected handling of possibly created empty clipRegions after PolyPolygon clipping http://svn.apache.org/viewvc?view=revision&revision=1237725 #115962# Better (but not yet optimal, see comments in task) handling of MetaFloatTransparentAction in PDF export http://svn.apache.org/viewvc?view=revision&revision=1241078 IP clearance: #118466# This patch removes librsvg, libcroco, libgsf, ... http://svn.apache.org/viewvc?view=revision&revision=1200879 118779# Added svg content streaming in/out to ImpGraphic stream operators http://svn.apache.org/viewvc?view=revision&revision=1231908 linecap: correctons for WaE and mac drawing http://svn.apache.org/viewvc?view=revision&revision=1232793 svg: uses current system Dpi for Svg replacement image creation http://svn.apache.org/viewvc?view=revision&revision=1233948 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394326 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1394326 Remove duplicate header includes. cws mba34issues01: #i117720#: convert assertion into warning http://svn.apache.org/viewvc?view=revision&revision=1172352 118485 - Styles for OLEs are not saved. Submitted by Armin Le Grand. http://svn.apache.org/viewvc?view=revision&revision=1182166 cws mba34issues01: #i117714#: remove assertion http://svn.apache.org/viewvc?view=revision&revision=1172357 Patch contributed by Jurgen Schmidt add some additional checks to ensure proper reading operations http://svn.apache.org/viewvc?view=revision&revision=1209022 mostly prefer our stream / bounds checking work. Patches contributed by Herbert Duerr #i118816# add clarifying comment regarding Font::*Color*() methods http://svn.apache.org/viewvc?view=revision&revision=1233833 extend macro->string handling for empty strings http://svn.apache.org/viewvc?view=revision&revision=1175801 avoid magic constants for SALCOLOR_NONE http://svn.apache.org/viewvc?view=revision&revision=1177543 initialize slant properly in ImplFontMetricData constructor (author=iorsh) http://svn.apache.org/viewvc?view=revision&revision=1177551 #i118675# make check for extension updates more stable http://svn.apache.org/viewvc?view=revision&revision=1214797 #a118617# remove VBasicEventListener.dll binary There are no known users depending on its CLSID http://svn.apache.org/viewvc?view=revision&revision=1203697 Patches contributed by Ariel Constenla-Haile Fix build breaker on Linux/gcc http://svn.apache.org/viewvc?view=revision&revision=1221104 Fix crash when trying to instantiate css.graphic.GraphicRasterizer_RSVG http://svn.apache.org/viewvc?view=revision&revision=1215559 Patches contributed by Oliver-Rainer Wittmann sw34bf06: #i117962# - method <SwFlyFrm::IsPaint(..)> - consider instances of <SwFlyDrawObj> http://svn.apache.org/viewvc?view=revision&revision=1172120 sw34bf06: #i117783# - Writer's implementation of XPagePrintable - apply print settings to new printing routines http://svn.apache.org/viewvc?view=revision&revision=1172115 gnumake4 work variously from Hans-Joachim Lankenau http://svn.apache.org/viewvc?view=revision&revision=1397315 http://svn.apache.org/viewvc?view=revision&revision=1396797 http://svn.apache.org/viewvc?view=revision&revision=1396782 http://svn.apache.org/viewvc?view=revision&revision=1394707 plus some amount of re-splitting of legacy headers. Patch contributed by Pavel Janik WaE: Remove unused variables. http://svn.apache.org/viewvc?view=revision&revision=1230697 Patches contributed by Takashi Ono mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 mingwport35: i#117795: MinGW port fix for vcl2gnumake http://svn.apache.org/viewvc?view=revision&revision=1172091 Patch contributed by Christian Lippka impress212: #i98044# re enable Text menu for outline and title shapes http://svn.apache.org/viewvc?view=revision&revision=1167639 Patch contributed by Andre Fischer 118674: Made category B code optional and disabled by default. http://svn.apache.org/viewvc?view=revision&revision=1215131 118881: Ignore empty paragraphs after bullets. http://svn.apache.org/viewvc?view=revision&revision=1296205 Patches contributed by Philipp Lohmann ooo340fixes: #i117780# use rtl allocator http://svn.apache.org/viewvc?view=revision&revision=1172087 ooo34gsl02: #i117807# fix an off by one error (index actually inside the pfb section header) http://svn.apache.org/viewvc?view=revision&revision=1167576 various cleanups, related compilation fixes, warning cleanups, re-working of obsolete stl template pieces to use boost instead, changed string classes, re-adapt KDE about data, about dialog, fixing warnings, and other fixes & improvements. Disable svg import / render for about/ branding code-paths for now. Restore full icon theme set. Remove OS/2 conditionals and sources. Remove conflicting gtk/full-screen monitors support. Retain existing svg rasterizer files - temporarily disabled. Standardize stringificaiton and fixup dllpostfix issues. Rename SvgGradientHelper::== to equalTo to avoid overloading issues. Use the flat GdiPlus API for LineCaps calls.
2012-10-09 12:22:23 +01:00
* 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 .
*/
2001-05-08 10:46:10 +00:00
#ifndef INCLUDED_VCL_INC_FONTMANAGER_HXX
#define INCLUDED_VCL_INC_FONTMANAGER_HXX
2001-05-08 10:46:10 +00:00
#include <list>
#include <map>
2002-02-28 10:53:08 +00:00
#include <set>
#include <unordered_map>
#include <vcl/dllapi.h>
#include <vcl/helper.hxx>
#include <vcl/timer.hxx>
#include <vcl/vclenum.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include "salglyphid.hxx"
#include <vector>
2001-05-08 10:46:10 +00:00
#define ATOM_FAMILYNAME 2
#define ATOM_PSNAME 3
/*
* some words on metrics: every length returned by PrintFontManager and
* friends are PostScript afm style, that is they are 1/1000 font height
*/
namespace utl { class MultiAtomProvider; }
CWS-TOOLING: integrate CWS otf01 2009-08-26 15:25:19 +0200 hdu r275426 : #i10000# make ubuntu-8.10 buildbot happy 2009-08-21 11:58:07 +0200 hdu r275230 : #i43029# another compile fix for 64bit platforms 2009-08-21 09:00:26 +0200 hdu r275216 : #i43029# sal_Int32 is defined differently on some platforms 2009-08-19 13:41:07 +0200 hdu r275149 : #i43029# fix use of sft-based subsetting in centralized code 2009-08-19 10:42:23 +0200 hdu r275140 : #i43029# --amend previous commit with omitted files 2009-08-19 10:14:54 +0200 hdu r275137 : #i43029# finishing touches for CWS otf01 start to centralize the previously open-coded font-subset/font-embed requests do the rest when the SCM allows source-file moves and commits with finer granularity 2009-08-17 15:11:24 +0200 hdu r275057 : CWS-TOOLING: rebase CWS otf01 to trunk@275001 (milestone: DEV300:m55) 2009-08-14 17:07:06 +0200 hdu r274998 : #i43029# CFF-subsetting now works on all platforms for PDF-export and PS-printing 2009-08-14 15:13:23 +0200 hdu r274984 : #i43029# OOo-build-baseline allows avoiding brute-forcing codepoint coverage calculation 2009-08-14 14:33:36 +0200 hdu r274981 : #i43029# CmapResult becomes a class 2009-08-13 15:57:55 +0200 hdu r274948 : #i43029# start implementing glue-code for CFF-subsetting on WIN 2009-08-10 17:10:46 +0200 hdu r274828 : #100000# WAE: signedness-warning 2009-08-10 14:08:05 +0200 hdu r274810 : #100000# 2009-08-10 13:34:55 +0200 hdu r274807 : #i43029# update ParseCmap() as we need to handle glyph-mapping ourselves on win for non-sft-supported fonts 2009-07-11 11:32:37 +0200 hdu r273909 : CWS-TOOLING: rebase CWS otf01 to trunk@273858 (milestone: DEV300:m52) 2009-07-03 17:14:55 +0200 hdu r273714 : #i43029# last step before centralizing UNX fontsubset code into platform independent layer 2009-07-03 17:00:14 +0200 hdu r273712 : #i10000# remove compile warning when debug=t 2009-07-03 16:28:29 +0200 hdu r273710 : #i43029# another step to centralize fontsubset code 2009-07-03 15:23:45 +0200 hdu r273705 : #i43029# PDF-export on UNX now starts to support OTF/CFF 2009-07-02 16:19:46 +0200 hdu r273663 : #i43029# warn when subsetting encounters glyph with deprecated SEAC-like endchar 2009-06-25 11:40:55 +0200 hdu r273372 : #i43029# ensure validity of cff-subsetted glyph name 2009-06-24 10:22:13 +0200 hdu r273318 : #i43029# check validity of exported sfnt subtable 2009-06-23 16:25:54 +0200 hdu r273292 : #i43029# use direct CFF->PFA font subsetting 2009-06-23 16:24:33 +0200 hdu r273289 : #i43029# allow font subset directly into a provided FILE handle 2009-06-23 16:22:44 +0200 hdu r273286 : #i43029# implement direct CFF->PFA font subsetting 2009-06-19 17:13:02 +0200 hdu r273171 : #i43029# CFF subsetting starts to work for psprinting 2009-06-18 15:48:42 +0200 hdu r273122 : #i43029# psprint requires explicit control of font subset name 2009-06-18 15:43:21 +0200 hdu r273121 : #i43029# psprint requires explicit control of font subset name 2009-06-16 18:15:43 +0200 hdu r273033 : #i43029# minor reshuffling to prepare CFF->PS font uploading 2009-06-16 16:25:21 +0200 hdu r273025 : #i43029# minimal-invasive change to sft.cxx to access a SFNT's CFF subtable 2009-06-12 15:51:42 +0200 hdu r272925 : #i43029# support OT/CFF subsetting for our PDF export on MacOSX 2009-06-12 15:43:26 +0200 hdu r272924 : #i43029# provide subset metrics as required by subset requesters 2009-05-27 13:58:59 +0200 hdu r272342 : #i43029# TripleInt is already reserved by OSX Carbon 2009-05-27 13:41:12 +0200 hdu r272339 : #i43029# fix warnings and make it compile on different platforms 2009-05-26 18:18:38 +0200 hdu r272315 : #i43029# start moving font subsetting into specialized class 2009-05-26 17:23:55 +0200 hdu r272312 : #i43029# improve name for CFF->PFB subsetted font 2009-05-25 17:12:27 +0200 hdu r272264 : #i43029# PDF-export: get type1-subsetting of the ground 2009-05-25 11:15:39 +0200 hdu r272227 : #i43029# fix BlueValues/FontBBox topdict entries 2009-05-25 10:59:16 +0200 hdu r272222 : #i43029# better PFB-DICT entries for FontBBox and BlueValues 2009-05-25 10:26:46 +0200 hdu r272219 : #i43029# emit other PRIVDICT hints for CFF->PFB subsetting 2009-05-25 10:10:25 +0200 hdu r272218 : #i43029# sign-extend shortint/longint typeopts/dictops 2009-05-25 09:38:33 +0200 hdu r272217 : #i43029# better glyph names for CFF-subsetted PFB 2009-05-20 18:57:11 +0200 hdu r272147 : #i43029# a CFF-subsetter gets the Blues 2009-05-20 14:05:35 +0200 hdu r272127 : #i43029# implement CreateFontSubsetFromCff() 2009-05-18 12:33:05 +0200 hdu r272012 : #i43029# add and use CffSubsetterContext::writeCurveTo() 2009-05-15 11:38:08 +0200 hdu r271931 : CffTable: allow charwidth parameter for type2 endchar operator 2009-05-14 18:55:25 +0200 hdu r271916 : #i43029# implement flex/flex1/hflex/hflex1 typeop conversion, fix type1val writing 2009-05-11 09:53:26 +0200 hdu r271750 : #i101695# improve import of ghostscript-PDF font names 2009-05-07 11:35:12 +0200 hdu r271644 : #i43029# adusted whitespace conventions from previously private code 2009-05-06 12:33:11 +0200 hdu r271579 : #i43029# change copyright header, fix warnings on some compilers 2009-05-06 10:50:50 +0200 hdu r271576 : improve whitespace and constness in some POS code 2009-05-05 16:10:56 +0200 hdu r271532 : #i43029# makefile support for new cff subsetter code 2009-05-05 14:56:29 +0200 hdu r271519 : #i43029# start integrating my CFF->Type1 subsetter code 2009-05-04 17:07:14 +0200 hdu r271474 : #i100140# remove obsoleted tables used for encoding conversion 2009-05-04 17:05:20 +0200 hdu r271473 : #i100140# use generic encoding converters in xlat.cxx 2009-04-15 11:58:25 +0200 hdu r270829 : #i101102# remove build dependency to removed module psprint 2009-04-14 15:57:13 +0200 hdu r270788 : CWS-TOOLING: rebase CWS otf01 to trunk@270723 (milestone: DEV300:m46) 2009-03-11 14:49:56 +0100 hdu r269335 : CWS-TOOLING: rebase CWS otf01 to trunk@269297 (milestone: DEV300:m43) 2009-02-06 12:32:22 +0100 hdu r267451 : resync CWS across CVS->SVN change 2009-02-06 12:32:04 +0100 hdu r267450 : resync CWS across CVS->SVN change
2009-08-27 12:02:29 +00:00
class FontSubsetInfo;
2010-02-18 08:31:39 +01:00
class ImplFontOptions;
class FontSelectPattern;
2001-05-08 10:46:10 +00:00
namespace psp {
class PPDParser;
2001-05-08 10:46:10 +00:00
namespace fonttype
{
enum type {
Unknown = 0,
Type1 = 1,
TrueType = 2,
};
}
/*
* the difference between FastPrintFontInfo and PrintFontInfo
* is that the information in FastPrintFontInfo can usually
* be gathered without openening either the font file or
* an afm metric file. they are gathered from fonts.dir alone.
* if only FastPrintFontInfo is gathered and PrintFontInfo
* on demand and for less fonts, then performance in startup
* increases considerably
*/
struct FastPrintFontInfo
{
fontID m_nID; // FontID
fonttype::type m_eType;
2001-05-08 10:46:10 +00:00
// font attributes
OUString m_aFamilyName;
OUString m_aStyleName;
std::list< OUString > m_aAliases;
FontFamily m_eFamilyStyle;
FontItalic m_eItalic;
FontWidth m_eWidth;
FontWeight m_eWeight;
FontPitch m_ePitch;
rtl_TextEncoding m_aEncoding;
bool m_bSubsettable;
bool m_bEmbeddable;
FastPrintFontInfo()
: m_nID(0)
, m_eType(fonttype::Unknown)
, m_eFamilyStyle(FAMILY_DONTKNOW)
, m_eItalic(ITALIC_DONTKNOW)
, m_eWidth(WIDTH_DONTKNOW)
, m_eWeight(WEIGHT_DONTKNOW)
, m_ePitch(PITCH_DONTKNOW)
, m_aEncoding(RTL_TEXTENCODING_DONTKNOW)
, m_bSubsettable(false)
, m_bEmbeddable(false)
{}
2001-05-08 10:46:10 +00:00
};
struct PrintFontInfo : public FastPrintFontInfo
{
2002-02-28 10:53:08 +00:00
int m_nAscend;
int m_nDescend;
int m_nLeading;
int m_nWidth;
PrintFontInfo() :
FastPrintFontInfo(),
m_nAscend( 0 ),
m_nDescend( 0 ),
m_nLeading( 0 ),
m_nWidth( 0 )
{}
2001-05-08 10:46:10 +00:00
};
// the values are per thousand of the font size
// note: width, height contain advances, not bounding box
struct CharacterMetric
{
short int width, height;
CharacterMetric() : width( 0 ), height( 0 ) {}
bool operator==( const CharacterMetric& rOther ) const
{ return rOther.width == width && rOther.height == height; }
bool operator!=( const CharacterMetric& rOther ) const
{ return rOther.width != width || rOther.height != height; }
2001-05-08 10:46:10 +00:00
};
class FontCache;
2001-05-08 10:46:10 +00:00
// a class to manage printable fonts
// aims are type1 and truetype fonts
class FontCache;
class VCL_PLUGIN_PUBLIC PrintFontManager
2001-05-08 10:46:10 +00:00
{
struct PrintFont;
struct TrueTypeFontFile;
struct Type1FontFile;
friend struct PrintFont;
friend struct TrueTypeFontFile;
friend struct Type1FontFile;
2002-02-28 10:53:08 +00:00
friend class FontCache;
2001-05-08 10:46:10 +00:00
struct PrintFontMetrics
{
// character metrics are stored by the following keys:
// lower two bytes contain a sal_Unicode (a UCS2 character)
// upper byte contains: 0 for horizontal metric
// 1 for vertical metric
// highest byte: 0 for now
std::unordered_map< int, CharacterMetric > m_aMetrics;
2001-05-08 10:46:10 +00:00
// contains the unicode blocks for which metrics were queried
// this implies that metrics should be queried in terms of
// unicode blocks. here a unicode block is identified
// by the upper byte of the UCS2 encoding.
// note that the corresponding bit should be set even
// if the font does not support a single character of that page
// this map shows, which pages were queried already
// if (like in AFM metrics) all metrics are queried in
// a single pass, then all bits should be set
char m_aPages[32];
std::unordered_map< sal_Unicode, bool > m_bVerticalSubstitutions;
2001-05-08 10:46:10 +00:00
PrintFontMetrics() {}
bool isEmpty() const { return m_aMetrics.empty(); }
2001-05-08 10:46:10 +00:00
};
struct PrintFont
{
fonttype::type m_eType;
// font attributes
int m_nFamilyName; // atom
std::list< int > m_aAliases;
2001-05-08 10:46:10 +00:00
int m_nPSName; // atom
OUString m_aStyleName;
FontItalic m_eItalic;
FontWidth m_eWidth;
FontWeight m_eWeight;
FontPitch m_ePitch;
2001-05-08 10:46:10 +00:00
rtl_TextEncoding m_aEncoding;
bool m_bFontEncodingOnly; // set if font should be only accessed by builtin encoding
2001-05-08 10:46:10 +00:00
CharacterMetric m_aGlobalMetricX;
CharacterMetric m_aGlobalMetricY;
PrintFontMetrics* m_pMetrics;
int m_nAscend;
int m_nDescend;
int m_nLeading;
int m_nXMin; // font bounding box
int m_nYMin;
int m_nXMax;
int m_nYMax;
2001-11-30 11:24:14 +00:00
bool m_bHaveVerticalSubstitutedGlyphs;
bool m_bUserOverride;
/// mapping from unicode (well, UCS-2) to font code
std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
/// HACK for Type 1 fonts: if multiple UCS-2 codes map to the same
/// font code, this set contains the preferred one, i.e., the one that
/// is specified explicitly via "C" or "CH" in the AFM file
std::set<sal_Unicode> m_aEncodingVectorPriority;
std::map< sal_Unicode, OString > m_aNonEncoded;
2001-05-08 10:46:10 +00:00
explicit PrintFont( fonttype::type eType );
2001-05-08 10:46:10 +00:00
virtual ~PrintFont();
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) = 0;
2001-05-08 10:46:10 +00:00
bool readAfmMetrics( utl::MultiAtomProvider* pProvider, bool bFillEncodingvector, bool bOnlyGlobalAttributes );
2001-05-08 10:46:10 +00:00
};
struct Type1FontFile : public PrintFont
{
int m_nDirectory; // atom containing system dependent path
OString m_aFontFile; // relative to directory
OString m_aMetricFile; // dito
2001-05-08 10:46:10 +00:00
/* note: m_aFontFile and Metric file are not atoms
because they should be fairly unique */
Type1FontFile() : PrintFont( fonttype::Type1 ), m_nDirectory( 0 ) {}
2001-05-08 10:46:10 +00:00
virtual ~Type1FontFile();
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) SAL_OVERRIDE;
2001-05-08 10:46:10 +00:00
};
struct TrueTypeFontFile : public PrintFont
{
int m_nDirectory; // atom containing system dependent path
OString m_aFontFile; // relative to directory
int m_nCollectionEntry; // 0 for regular fonts, 0 to ... for fonts stemming from collections
unsigned int m_nTypeFlags; // copyright bits and PS-OpenType flag
2001-05-08 10:46:10 +00:00
CWS-TOOLING: integrate CWS otf01 2009-08-26 15:25:19 +0200 hdu r275426 : #i10000# make ubuntu-8.10 buildbot happy 2009-08-21 11:58:07 +0200 hdu r275230 : #i43029# another compile fix for 64bit platforms 2009-08-21 09:00:26 +0200 hdu r275216 : #i43029# sal_Int32 is defined differently on some platforms 2009-08-19 13:41:07 +0200 hdu r275149 : #i43029# fix use of sft-based subsetting in centralized code 2009-08-19 10:42:23 +0200 hdu r275140 : #i43029# --amend previous commit with omitted files 2009-08-19 10:14:54 +0200 hdu r275137 : #i43029# finishing touches for CWS otf01 start to centralize the previously open-coded font-subset/font-embed requests do the rest when the SCM allows source-file moves and commits with finer granularity 2009-08-17 15:11:24 +0200 hdu r275057 : CWS-TOOLING: rebase CWS otf01 to trunk@275001 (milestone: DEV300:m55) 2009-08-14 17:07:06 +0200 hdu r274998 : #i43029# CFF-subsetting now works on all platforms for PDF-export and PS-printing 2009-08-14 15:13:23 +0200 hdu r274984 : #i43029# OOo-build-baseline allows avoiding brute-forcing codepoint coverage calculation 2009-08-14 14:33:36 +0200 hdu r274981 : #i43029# CmapResult becomes a class 2009-08-13 15:57:55 +0200 hdu r274948 : #i43029# start implementing glue-code for CFF-subsetting on WIN 2009-08-10 17:10:46 +0200 hdu r274828 : #100000# WAE: signedness-warning 2009-08-10 14:08:05 +0200 hdu r274810 : #100000# 2009-08-10 13:34:55 +0200 hdu r274807 : #i43029# update ParseCmap() as we need to handle glyph-mapping ourselves on win for non-sft-supported fonts 2009-07-11 11:32:37 +0200 hdu r273909 : CWS-TOOLING: rebase CWS otf01 to trunk@273858 (milestone: DEV300:m52) 2009-07-03 17:14:55 +0200 hdu r273714 : #i43029# last step before centralizing UNX fontsubset code into platform independent layer 2009-07-03 17:00:14 +0200 hdu r273712 : #i10000# remove compile warning when debug=t 2009-07-03 16:28:29 +0200 hdu r273710 : #i43029# another step to centralize fontsubset code 2009-07-03 15:23:45 +0200 hdu r273705 : #i43029# PDF-export on UNX now starts to support OTF/CFF 2009-07-02 16:19:46 +0200 hdu r273663 : #i43029# warn when subsetting encounters glyph with deprecated SEAC-like endchar 2009-06-25 11:40:55 +0200 hdu r273372 : #i43029# ensure validity of cff-subsetted glyph name 2009-06-24 10:22:13 +0200 hdu r273318 : #i43029# check validity of exported sfnt subtable 2009-06-23 16:25:54 +0200 hdu r273292 : #i43029# use direct CFF->PFA font subsetting 2009-06-23 16:24:33 +0200 hdu r273289 : #i43029# allow font subset directly into a provided FILE handle 2009-06-23 16:22:44 +0200 hdu r273286 : #i43029# implement direct CFF->PFA font subsetting 2009-06-19 17:13:02 +0200 hdu r273171 : #i43029# CFF subsetting starts to work for psprinting 2009-06-18 15:48:42 +0200 hdu r273122 : #i43029# psprint requires explicit control of font subset name 2009-06-18 15:43:21 +0200 hdu r273121 : #i43029# psprint requires explicit control of font subset name 2009-06-16 18:15:43 +0200 hdu r273033 : #i43029# minor reshuffling to prepare CFF->PS font uploading 2009-06-16 16:25:21 +0200 hdu r273025 : #i43029# minimal-invasive change to sft.cxx to access a SFNT's CFF subtable 2009-06-12 15:51:42 +0200 hdu r272925 : #i43029# support OT/CFF subsetting for our PDF export on MacOSX 2009-06-12 15:43:26 +0200 hdu r272924 : #i43029# provide subset metrics as required by subset requesters 2009-05-27 13:58:59 +0200 hdu r272342 : #i43029# TripleInt is already reserved by OSX Carbon 2009-05-27 13:41:12 +0200 hdu r272339 : #i43029# fix warnings and make it compile on different platforms 2009-05-26 18:18:38 +0200 hdu r272315 : #i43029# start moving font subsetting into specialized class 2009-05-26 17:23:55 +0200 hdu r272312 : #i43029# improve name for CFF->PFB subsetted font 2009-05-25 17:12:27 +0200 hdu r272264 : #i43029# PDF-export: get type1-subsetting of the ground 2009-05-25 11:15:39 +0200 hdu r272227 : #i43029# fix BlueValues/FontBBox topdict entries 2009-05-25 10:59:16 +0200 hdu r272222 : #i43029# better PFB-DICT entries for FontBBox and BlueValues 2009-05-25 10:26:46 +0200 hdu r272219 : #i43029# emit other PRIVDICT hints for CFF->PFB subsetting 2009-05-25 10:10:25 +0200 hdu r272218 : #i43029# sign-extend shortint/longint typeopts/dictops 2009-05-25 09:38:33 +0200 hdu r272217 : #i43029# better glyph names for CFF-subsetted PFB 2009-05-20 18:57:11 +0200 hdu r272147 : #i43029# a CFF-subsetter gets the Blues 2009-05-20 14:05:35 +0200 hdu r272127 : #i43029# implement CreateFontSubsetFromCff() 2009-05-18 12:33:05 +0200 hdu r272012 : #i43029# add and use CffSubsetterContext::writeCurveTo() 2009-05-15 11:38:08 +0200 hdu r271931 : CffTable: allow charwidth parameter for type2 endchar operator 2009-05-14 18:55:25 +0200 hdu r271916 : #i43029# implement flex/flex1/hflex/hflex1 typeop conversion, fix type1val writing 2009-05-11 09:53:26 +0200 hdu r271750 : #i101695# improve import of ghostscript-PDF font names 2009-05-07 11:35:12 +0200 hdu r271644 : #i43029# adusted whitespace conventions from previously private code 2009-05-06 12:33:11 +0200 hdu r271579 : #i43029# change copyright header, fix warnings on some compilers 2009-05-06 10:50:50 +0200 hdu r271576 : improve whitespace and constness in some POS code 2009-05-05 16:10:56 +0200 hdu r271532 : #i43029# makefile support for new cff subsetter code 2009-05-05 14:56:29 +0200 hdu r271519 : #i43029# start integrating my CFF->Type1 subsetter code 2009-05-04 17:07:14 +0200 hdu r271474 : #i100140# remove obsoleted tables used for encoding conversion 2009-05-04 17:05:20 +0200 hdu r271473 : #i100140# use generic encoding converters in xlat.cxx 2009-04-15 11:58:25 +0200 hdu r270829 : #i101102# remove build dependency to removed module psprint 2009-04-14 15:57:13 +0200 hdu r270788 : CWS-TOOLING: rebase CWS otf01 to trunk@270723 (milestone: DEV300:m46) 2009-03-11 14:49:56 +0100 hdu r269335 : CWS-TOOLING: rebase CWS otf01 to trunk@269297 (milestone: DEV300:m43) 2009-02-06 12:32:22 +0100 hdu r267451 : resync CWS across CVS->SVN change 2009-02-06 12:32:04 +0100 hdu r267450 : resync CWS across CVS->SVN change
2009-08-27 12:02:29 +00:00
TrueTypeFontFile();
2001-05-08 10:46:10 +00:00
virtual ~TrueTypeFontFile();
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) SAL_OVERRIDE;
2001-05-08 10:46:10 +00:00
};
fontID m_nNextFontID;
std::unordered_map< fontID, PrintFont* > m_aFonts;
std::unordered_map< int, FontFamily > m_aFamilyTypes;
std::list< OUString > m_aPrinterDrivers;
std::list< OString > m_aFontDirectories;
std::list< int > m_aPrivateFontDirectories;
utl::MultiAtomProvider* m_pAtoms;
2002-02-28 10:53:08 +00:00
// for speeding up findFontFileID
std::unordered_map< OString, std::set< fontID >, OStringHash >
2002-02-28 10:53:08 +00:00
m_aFontFileToFontID;
2001-05-08 10:46:10 +00:00
std::unordered_map< OString, int, OStringHash >
2001-05-08 10:46:10 +00:00
m_aDirToAtom;
std::unordered_map< int, OString > m_aAtomToDir;
int m_nNextDirAtom;
std::unordered_multimap< OString, sal_Unicode, OStringHash >
m_aAdobenameToUnicode;
std::unordered_multimap< sal_Unicode, OString >
m_aUnicodeToAdobename;
std::unordered_multimap< sal_Unicode, sal_uInt8 > m_aUnicodeToAdobecode;
std::unordered_multimap< sal_uInt8, sal_Unicode > m_aAdobecodeToUnicode;
2001-05-08 10:46:10 +00:00
mutable FontCache* m_pFontCache;
OString getAfmFile( PrintFont* pFont ) const;
OString getFontFile( PrintFont* pFont ) const;
2001-05-08 10:46:10 +00:00
bool analyzeFontFile( int nDirID, const OString& rFileName, std::list< PrintFont* >& rNewFonts, const char *pFormat=NULL ) const;
static OUString convertTrueTypeName( void* pNameRecord ); // actually a NameRecord* formt font subsetting code
static void analyzeTrueTypeFamilyName( void* pTTFont, std::list< OUString >& rnames ); // actually a TrueTypeFont* from font subsetting code
2001-05-08 10:46:10 +00:00
bool analyzeTrueTypeFile( PrintFont* pFont ) const;
// finds the font id for the nFaceIndex face in this font file
// There may be multiple font ids for TrueType collections
fontID findFontFileID( int nDirID, const OString& rFile, int nFaceIndex ) const;
// There may be multiple font ids for TrueType collections
std::vector<fontID> findFontFileIDs( int nDirID, const OString& rFile ) const;
bool knownFontFile( int nDirID, const OString& rFile ) const
{
return findFontFileID(nDirID, rFile, 0) != 0;
}
static FontFamily matchFamilyName( const OUString& rFamily );
2001-05-08 10:46:10 +00:00
PrintFont* getFont( fontID nID ) const
{
std::unordered_map< fontID, PrintFont* >::const_iterator it;
2001-05-08 10:46:10 +00:00
it = m_aFonts.find( nID );
return it == m_aFonts.end() ? NULL : it->second;
}
void fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const;
void fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const;
OString getDirectory( int nAtom ) const;
int getDirectoryAtom( const OString& rDirectory, bool bCreate = false );
2001-05-08 10:46:10 +00:00
/* try to initialize fonts from libfontconfig
called from <code>initialize()</code>
*/
static void initFontconfig();
void countFontconfigFonts( std::unordered_map<OString, int, OStringHash>& o_rVisitedPaths );
/* deinitialize fontconfig
*/
static void deinitFontconfig();
/* register an application specific font directory for libfontconfig
since fontconfig is asked for font substitutes before OOo will check for font availability
and fontconfig will happily substitute fonts it doesn't know (e.g. "Arial Narrow" -> "DejaVu Sans Book"!)
it becomes necessary to tell the library about all the hidden font treasures
@returns
true if libfontconfig accepted the directory
false else (e.g. no libfontconfig found)
*/
static bool addFontconfigDir(const OString& rDirectory);
std::set<OString> m_aPreviousLangSupportRequests;
std::vector<OString> m_aCurrentRequests;
Timer m_aFontInstallerTimer;
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
DECL_LINK_TYPED( autoInstallFontLangSupport, Timer*, void );
#endif
2001-05-08 10:46:10 +00:00
PrintFontManager();
~PrintFontManager();
public:
static PrintFontManager& get(); // one instance only
// There may be multiple font ids for TrueType collections
std::vector<fontID> addFontFile( const OString& rFileName );
2001-05-08 10:46:10 +00:00
void initialize();
2001-05-08 10:46:10 +00:00
// returns the number of managed fonts
int getFontCount() const { return m_aFonts.size(); }
// returns the ids of all managed fonts.
void getFontList( std::list< fontID >& rFontIDs );
2001-05-08 10:46:10 +00:00
// get font info for a specific font
bool getFontInfo( fontID nFontID, PrintFontInfo& rInfo ) const;
// get fast font info for a specific font
bool getFontFastInfo( fontID nFontID, FastPrintFontInfo& rInfo ) const;
// routines to get font info in small pieces
// get a specific fonts PSName name
const OUString& getPSName( fontID nFontID ) const;
2001-05-08 10:46:10 +00:00
2002-02-28 10:53:08 +00:00
// get a specific fonts family name aliases
void getFontFamilyAliases( fontID nFontID ) const;
2002-02-28 10:53:08 +00:00
2001-05-08 10:46:10 +00:00
// get a specific fonts type
fonttype::type getFontType( fontID nFontID ) const
{
PrintFont* pFont = getFont( nFontID );
return pFont ? pFont->m_eType : fonttype::Unknown;
}
// get a specific fonts italic type
FontItalic getFontItalic( fontID nFontID ) const
2001-05-08 10:46:10 +00:00
{
PrintFont* pFont = getFont( nFontID );
return pFont ? pFont->m_eItalic : ITALIC_DONTKNOW;
2001-05-08 10:46:10 +00:00
}
// get a specific fonts width type
FontWidth getFontWidth( fontID nFontID ) const
2001-05-08 10:46:10 +00:00
{
PrintFont* pFont = getFont( nFontID );
return pFont ? pFont->m_eWidth : WIDTH_DONTKNOW;
2001-05-08 10:46:10 +00:00
}
// get a specific fonts weight type
FontWeight getFontWeight( fontID nFontID ) const
2001-05-08 10:46:10 +00:00
{
PrintFont* pFont = getFont( nFontID );
return pFont ? pFont->m_eWeight : WEIGHT_DONTKNOW;
2001-05-08 10:46:10 +00:00
}
// get a specific fonts pitch type
FontPitch getFontPitch( fontID nFontID ) const
2001-05-08 10:46:10 +00:00
{
PrintFont* pFont = getFont( nFontID );
return pFont ? pFont->m_ePitch : PITCH_DONTKNOW;
2001-05-08 10:46:10 +00:00
}
// get a specific fonts encoding
rtl_TextEncoding getFontEncoding( fontID nFontID ) const
{
PrintFont* pFont = getFont( nFontID );
return pFont ? pFont->m_aEncoding : RTL_TEXTENCODING_DONTKNOW;
}
// should i only use font's builtin encoding ?
bool getUseOnlyFontEncoding( fontID nFontID ) const
{
PrintFont* pFont = getFont( nFontID );
return pFont && pFont->m_bFontEncodingOnly;
}
2001-05-08 10:46:10 +00:00
// get a specific fonts system dependent filename
OString getFontFileSysPath( fontID nFontID ) const
2001-05-08 10:46:10 +00:00
{
return getFontFile( getFont( nFontID ) );
}
// get the ttc face number
int getFontFaceNumber( fontID nFontID ) const;
2001-05-08 10:46:10 +00:00
// get a specific fonts ascend
int getFontAscend( fontID nFontID ) const;
// get a specific fonts descent
int getFontDescend( fontID nFontID ) const;
// get a fonts glyph bounding box
bool getFontBoundingBox( fontID nFont, int& xMin, int& yMin, int& xMax, int& yMax );
// info whether an array of glyphs has vertical substitutions
void hasVerticalSubstitutions( fontID nFontID, const sal_Unicode* pCharacters,
int nCharacters, bool* pHasSubst ) const;
2001-05-08 10:46:10 +00:00
// get a specific fonts metrics
// get metrics for a sal_Unicode range
// the user is responsible to allocate pArray large enough
bool getMetrics( fontID nFontID, sal_Unicode minCharacter, sal_Unicode maxCharacter, CharacterMetric* pArray, bool bVertical = false ) const;
// get metrics for an array of sal_Unicode characters
// the user is responsible to allocate pArray large enough
bool getMetrics( fontID nFontID, const sal_Unicode* pString, int nLen, CharacterMetric* pArray, bool bVertical = false ) const;
// get encoding vector of font, currently only for Type1 fonts
// returns NULL if encoding vector is empty or font is not type1;
// if ppNonEncoded is set and non encoded type1 glyphs exist
// then *ppNonEncoded is set to the mapping for nonencoded glyphs.
// the encoding vector contains -1 for non encoded glyphs
const std::map< sal_Unicode, sal_Int32 >* getEncodingMap( fontID nFontID, const std::map< sal_Unicode, OString >** ppNonEncoded, std::set<sal_Unicode> const ** ppPriority ) const;
// evaluates copyright flags for TrueType fonts for printing/viewing
// type1 fonts do not have such a feature, so return for them is true
bool isFontDownloadingAllowedForPrinting( fontID nFont ) const;
// helper for type 1 fonts
std::list< OString > getAdobeNameFromUnicode( sal_Unicode aChar ) const;
std::pair< std::unordered_multimap< sal_Unicode, sal_uInt8 >::const_iterator,
std::unordered_multimap< sal_Unicode, sal_uInt8 >::const_iterator >
getAdobeCodeFromUnicode( sal_Unicode aChar ) const
{
return m_aUnicodeToAdobecode.equal_range( aChar );
}
std::list< sal_Unicode > getUnicodeFromAdobeName( const OString& rName ) const;
std::pair< std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator,
std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator >
getUnicodeFromAdobeCode( sal_uInt8 aChar ) const
{
return m_aAdobecodeToUnicode.equal_range( aChar );
}
// creates a new font subset of an existing TrueType font
// returns true in case of success, else false
// nFont: the font to be subsetted
// rOutFile: the file to put the new subset into;
// must be a valid osl file URL
// pGlyphIDs: input array of glyph ids for new font
// pNewEncoding: the corresponding encoding in the new font
// pWidths: output array of widths of requested glyphs
// nGlyphs: number of glyphs in arrays
// pCapHeight:: capital height of the produced font
// pXMin, pYMin, pXMax, pYMax: outgoing font bounding box
CWS-TOOLING: integrate CWS otf01 2009-08-26 15:25:19 +0200 hdu r275426 : #i10000# make ubuntu-8.10 buildbot happy 2009-08-21 11:58:07 +0200 hdu r275230 : #i43029# another compile fix for 64bit platforms 2009-08-21 09:00:26 +0200 hdu r275216 : #i43029# sal_Int32 is defined differently on some platforms 2009-08-19 13:41:07 +0200 hdu r275149 : #i43029# fix use of sft-based subsetting in centralized code 2009-08-19 10:42:23 +0200 hdu r275140 : #i43029# --amend previous commit with omitted files 2009-08-19 10:14:54 +0200 hdu r275137 : #i43029# finishing touches for CWS otf01 start to centralize the previously open-coded font-subset/font-embed requests do the rest when the SCM allows source-file moves and commits with finer granularity 2009-08-17 15:11:24 +0200 hdu r275057 : CWS-TOOLING: rebase CWS otf01 to trunk@275001 (milestone: DEV300:m55) 2009-08-14 17:07:06 +0200 hdu r274998 : #i43029# CFF-subsetting now works on all platforms for PDF-export and PS-printing 2009-08-14 15:13:23 +0200 hdu r274984 : #i43029# OOo-build-baseline allows avoiding brute-forcing codepoint coverage calculation 2009-08-14 14:33:36 +0200 hdu r274981 : #i43029# CmapResult becomes a class 2009-08-13 15:57:55 +0200 hdu r274948 : #i43029# start implementing glue-code for CFF-subsetting on WIN 2009-08-10 17:10:46 +0200 hdu r274828 : #100000# WAE: signedness-warning 2009-08-10 14:08:05 +0200 hdu r274810 : #100000# 2009-08-10 13:34:55 +0200 hdu r274807 : #i43029# update ParseCmap() as we need to handle glyph-mapping ourselves on win for non-sft-supported fonts 2009-07-11 11:32:37 +0200 hdu r273909 : CWS-TOOLING: rebase CWS otf01 to trunk@273858 (milestone: DEV300:m52) 2009-07-03 17:14:55 +0200 hdu r273714 : #i43029# last step before centralizing UNX fontsubset code into platform independent layer 2009-07-03 17:00:14 +0200 hdu r273712 : #i10000# remove compile warning when debug=t 2009-07-03 16:28:29 +0200 hdu r273710 : #i43029# another step to centralize fontsubset code 2009-07-03 15:23:45 +0200 hdu r273705 : #i43029# PDF-export on UNX now starts to support OTF/CFF 2009-07-02 16:19:46 +0200 hdu r273663 : #i43029# warn when subsetting encounters glyph with deprecated SEAC-like endchar 2009-06-25 11:40:55 +0200 hdu r273372 : #i43029# ensure validity of cff-subsetted glyph name 2009-06-24 10:22:13 +0200 hdu r273318 : #i43029# check validity of exported sfnt subtable 2009-06-23 16:25:54 +0200 hdu r273292 : #i43029# use direct CFF->PFA font subsetting 2009-06-23 16:24:33 +0200 hdu r273289 : #i43029# allow font subset directly into a provided FILE handle 2009-06-23 16:22:44 +0200 hdu r273286 : #i43029# implement direct CFF->PFA font subsetting 2009-06-19 17:13:02 +0200 hdu r273171 : #i43029# CFF subsetting starts to work for psprinting 2009-06-18 15:48:42 +0200 hdu r273122 : #i43029# psprint requires explicit control of font subset name 2009-06-18 15:43:21 +0200 hdu r273121 : #i43029# psprint requires explicit control of font subset name 2009-06-16 18:15:43 +0200 hdu r273033 : #i43029# minor reshuffling to prepare CFF->PS font uploading 2009-06-16 16:25:21 +0200 hdu r273025 : #i43029# minimal-invasive change to sft.cxx to access a SFNT's CFF subtable 2009-06-12 15:51:42 +0200 hdu r272925 : #i43029# support OT/CFF subsetting for our PDF export on MacOSX 2009-06-12 15:43:26 +0200 hdu r272924 : #i43029# provide subset metrics as required by subset requesters 2009-05-27 13:58:59 +0200 hdu r272342 : #i43029# TripleInt is already reserved by OSX Carbon 2009-05-27 13:41:12 +0200 hdu r272339 : #i43029# fix warnings and make it compile on different platforms 2009-05-26 18:18:38 +0200 hdu r272315 : #i43029# start moving font subsetting into specialized class 2009-05-26 17:23:55 +0200 hdu r272312 : #i43029# improve name for CFF->PFB subsetted font 2009-05-25 17:12:27 +0200 hdu r272264 : #i43029# PDF-export: get type1-subsetting of the ground 2009-05-25 11:15:39 +0200 hdu r272227 : #i43029# fix BlueValues/FontBBox topdict entries 2009-05-25 10:59:16 +0200 hdu r272222 : #i43029# better PFB-DICT entries for FontBBox and BlueValues 2009-05-25 10:26:46 +0200 hdu r272219 : #i43029# emit other PRIVDICT hints for CFF->PFB subsetting 2009-05-25 10:10:25 +0200 hdu r272218 : #i43029# sign-extend shortint/longint typeopts/dictops 2009-05-25 09:38:33 +0200 hdu r272217 : #i43029# better glyph names for CFF-subsetted PFB 2009-05-20 18:57:11 +0200 hdu r272147 : #i43029# a CFF-subsetter gets the Blues 2009-05-20 14:05:35 +0200 hdu r272127 : #i43029# implement CreateFontSubsetFromCff() 2009-05-18 12:33:05 +0200 hdu r272012 : #i43029# add and use CffSubsetterContext::writeCurveTo() 2009-05-15 11:38:08 +0200 hdu r271931 : CffTable: allow charwidth parameter for type2 endchar operator 2009-05-14 18:55:25 +0200 hdu r271916 : #i43029# implement flex/flex1/hflex/hflex1 typeop conversion, fix type1val writing 2009-05-11 09:53:26 +0200 hdu r271750 : #i101695# improve import of ghostscript-PDF font names 2009-05-07 11:35:12 +0200 hdu r271644 : #i43029# adusted whitespace conventions from previously private code 2009-05-06 12:33:11 +0200 hdu r271579 : #i43029# change copyright header, fix warnings on some compilers 2009-05-06 10:50:50 +0200 hdu r271576 : improve whitespace and constness in some POS code 2009-05-05 16:10:56 +0200 hdu r271532 : #i43029# makefile support for new cff subsetter code 2009-05-05 14:56:29 +0200 hdu r271519 : #i43029# start integrating my CFF->Type1 subsetter code 2009-05-04 17:07:14 +0200 hdu r271474 : #i100140# remove obsoleted tables used for encoding conversion 2009-05-04 17:05:20 +0200 hdu r271473 : #i100140# use generic encoding converters in xlat.cxx 2009-04-15 11:58:25 +0200 hdu r270829 : #i101102# remove build dependency to removed module psprint 2009-04-14 15:57:13 +0200 hdu r270788 : CWS-TOOLING: rebase CWS otf01 to trunk@270723 (milestone: DEV300:m46) 2009-03-11 14:49:56 +0100 hdu r269335 : CWS-TOOLING: rebase CWS otf01 to trunk@269297 (milestone: DEV300:m43) 2009-02-06 12:32:22 +0100 hdu r267451 : resync CWS across CVS->SVN change 2009-02-06 12:32:04 +0100 hdu r267450 : resync CWS across CVS->SVN change
2009-08-27 12:02:29 +00:00
// TODO: callers of this method should use its FontSubsetInfo counterpart directly
bool createFontSubset( FontSubsetInfo&,
fontID nFont,
const OUString& rOutFile,
const sal_GlyphId* pGlyphIDs,
const sal_uInt8* pNewEncoding,
sal_Int32* pWidths,
int nGlyphs,
bool bVertical = false
);
void getGlyphWidths( fontID nFont,
bool bVertical,
std::vector< sal_Int32 >& rWidths,
std::map< sal_Unicode, sal_uInt32 >& rUnicodeEnc );
2001-05-08 10:46:10 +00:00
// font administration functions
/* system dependendent font matching
<p>
<code>matchFont</code> matches a pattern of font characteristics
and returns the closest match if possibe. If a match was found
the <code>FastPrintFontInfo</code> passed in as parameter
will be update to the found matching font.
</p>
<p>
implementation note: currently the function is only implemented
for fontconfig.
</p>
@param rInfo
out of the FastPrintFontInfo structure the following
fields will be used for the match:
<ul>
<li>family name</li>
<li>italic</li>
<li>width</li>
<li>weight</li>
<li>pitch</li>
</ul>
@param rLocale
if <code>rLocal</code> contains non empty strings the corresponding
locale will be used for font matching also; e.g. "Sans" can result
in different fonts in e.g. english and japanese
@returns
true if a match was found
false else
*/
bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale );
static ImplFontOptions* getFontOptions( const FastPrintFontInfo&, int nSize, void (*subcallback)(void*));
bool Substitute( FontSelectPattern &rPattern, OUString& rMissingCodes );
int FreeTypeCharIndex( void *pFace, sal_uInt32 aChar );
2001-05-08 10:46:10 +00:00
};
} // namespace
#endif // INCLUDED_VCL_INC_FONTMANAGER_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */