2010-10-14 08:27:31 +02:00
|
|
|
/* -*- 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
|
|
|
|
2013-12-11 10:13:15 +02:00
|
|
|
#ifndef INCLUDED_VCL_INC_FONTMANAGER_HXX
|
|
|
|
#define INCLUDED_VCL_INC_FONTMANAGER_HXX
|
2001-05-08 10:46:10 +00:00
|
|
|
|
|
|
|
#include <list>
|
2015-01-01 19:58:59 +00:00
|
|
|
#include <map>
|
2002-02-28 10:53:08 +00:00
|
|
|
#include <set>
|
2015-01-01 19:58:59 +00:00
|
|
|
#include <unordered_map>
|
2009-03-06 09:33:41 +00:00
|
|
|
|
2013-11-09 15:31:59 -06:00
|
|
|
#include <vcl/dllapi.h>
|
|
|
|
#include <vcl/helper.hxx>
|
|
|
|
#include <vcl/timer.hxx>
|
|
|
|
#include <vcl/vclenum.hxx>
|
|
|
|
#include <com/sun/star/lang/Locale.hpp>
|
2013-12-16 16:07:41 +00:00
|
|
|
#include "salglyphid.hxx"
|
2004-10-13 07:21:47 +00:00
|
|
|
|
2011-02-04 18:35:11 -08:00
|
|
|
#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
|
|
|
|
*/
|
|
|
|
|
2015-04-30 05:32:26 +03:00
|
|
|
namespace utl { class MultiAtomProvider; }
|
|
|
|
|
2009-08-27 12:02:29 +00:00
|
|
|
class FontSubsetInfo;
|
2010-02-18 08:31:39 +01:00
|
|
|
class ImplFontOptions;
|
2011-10-27 16:37:28 +01:00
|
|
|
class FontSelectPattern;
|
2001-05-08 10:46:10 +00:00
|
|
|
|
|
|
|
namespace psp {
|
2015-04-30 05:32:26 +03:00
|
|
|
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
|
|
|
|
{
|
2014-01-24 14:21:57 +00:00
|
|
|
fontID m_nID; // FontID
|
|
|
|
fonttype::type m_eType;
|
2001-05-08 10:46:10 +00:00
|
|
|
|
|
|
|
// font attributes
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString m_aFamilyName;
|
|
|
|
OUString m_aStyleName;
|
|
|
|
std::list< OUString > m_aAliases;
|
2014-01-24 14:21:57 +00:00
|
|
|
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;
|
2004-07-05 08:22:12 +00:00
|
|
|
|
2014-01-24 14:21:57 +00:00
|
|
|
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)
|
2004-07-05 08:22:12 +00:00
|
|
|
{}
|
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;
|
2004-07-05 08:22:12 +00:00
|
|
|
|
|
|
|
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 ) {}
|
2004-07-05 08:22:12 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2005-08-05 11:52:53 +00:00
|
|
|
class FontCache;
|
|
|
|
|
2001-05-08 10:46:10 +00:00
|
|
|
// a class to manage printable fonts
|
|
|
|
// aims are type1 and truetype fonts
|
|
|
|
|
2005-08-05 12:21:02 +00:00
|
|
|
class FontCache;
|
|
|
|
|
2012-09-07 14:35:10 +02:00
|
|
|
class VCL_PLUGIN_PUBLIC PrintFontManager
|
2001-05-08 10:46:10 +00:00
|
|
|
{
|
|
|
|
struct PrintFont;
|
|
|
|
struct TrueTypeFontFile;
|
|
|
|
struct Type1FontFile;
|
2007-12-12 12:16:19 +00:00
|
|
|
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
|
2015-01-01 19:58:59 +00:00
|
|
|
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];
|
|
|
|
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_map< sal_Unicode, bool > m_bVerticalSubstitutions;
|
2001-05-08 10:46:10 +00:00
|
|
|
|
2013-05-16 19:06:26 +02:00
|
|
|
PrintFontMetrics() {}
|
2006-06-02 08:47:47 +00:00
|
|
|
|
|
|
|
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
|
2003-04-17 14:10:22 +00:00
|
|
|
std::list< int > m_aAliases;
|
2001-05-08 10:46:10 +00:00
|
|
|
int m_nPSName; // atom
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString m_aStyleName;
|
2011-04-09 22:48:40 +02:00
|
|
|
FontItalic m_eItalic;
|
2011-04-05 20:54:37 +02:00
|
|
|
FontWidth m_eWidth;
|
2011-04-06 22:13:21 +02:00
|
|
|
FontWeight m_eWeight;
|
2011-04-09 22:48:40 +02:00
|
|
|
FontPitch m_ePitch;
|
2001-05-08 10:46:10 +00:00
|
|
|
rtl_TextEncoding m_aEncoding;
|
2003-06-30 13:25:57 +00:00
|
|
|
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;
|
2002-07-20 14:21:19 +00:00
|
|
|
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;
|
2005-01-31 07:58:54 +00:00
|
|
|
bool m_bUserOverride;
|
2006-03-29 10:21:16 +00:00
|
|
|
|
2015-01-27 00:20:58 +01:00
|
|
|
/// mapping from unicode (well, UCS-2) to font code
|
2003-04-17 14:10:22 +00:00
|
|
|
std::map< sal_Unicode, sal_Int32 > m_aEncodingVector;
|
2015-01-27 00:20:58 +01:00
|
|
|
/// 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;
|
2013-04-07 12:06:47 +02:00
|
|
|
std::map< sal_Unicode, OString > m_aNonEncoded;
|
2001-05-08 10:46:10 +00:00
|
|
|
|
2013-01-14 14:08:03 +00:00
|
|
|
explicit PrintFont( fonttype::type eType );
|
2001-05-08 10:46:10 +00:00
|
|
|
virtual ~PrintFont();
|
2003-04-17 14:10:22 +00:00
|
|
|
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) = 0;
|
2001-05-08 10:46:10 +00:00
|
|
|
|
2013-02-22 19:25:43 +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
|
2013-04-07 12:06:47 +02:00
|
|
|
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 */
|
|
|
|
|
2001-06-08 15:32:30 +00:00
|
|
|
Type1FontFile() : PrintFont( fonttype::Type1 ), m_nDirectory( 0 ) {}
|
2001-05-08 10:46:10 +00:00
|
|
|
virtual ~Type1FontFile();
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) SAL_OVERRIDE;
|
2001-05-08 10:46:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct TrueTypeFontFile : public PrintFont
|
|
|
|
{
|
2012-01-11 11:57:01 +00:00
|
|
|
int m_nDirectory; // atom containing system dependent path
|
2013-04-07 12:06:47 +02:00
|
|
|
OString m_aFontFile; // relative to directory
|
2012-01-11 11:57:01 +00:00
|
|
|
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
|
|
|
|
2009-08-27 12:02:29 +00:00
|
|
|
TrueTypeFontFile();
|
2001-05-08 10:46:10 +00:00
|
|
|
virtual ~TrueTypeFontFile();
|
2014-03-26 16:37:00 +01:00
|
|
|
virtual bool queryMetricPage( int nPage, utl::MultiAtomProvider* pProvider ) SAL_OVERRIDE;
|
2001-05-08 10:46:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
fontID m_nNextFontID;
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_map< fontID, PrintFont* > m_aFonts;
|
|
|
|
std::unordered_map< int, FontFamily > m_aFamilyTypes;
|
2013-04-07 12:06:47 +02:00
|
|
|
std::list< OUString > m_aPrinterDrivers;
|
|
|
|
std::list< OString > m_aFontDirectories;
|
2003-04-17 14:10:22 +00:00
|
|
|
std::list< int > m_aPrivateFontDirectories;
|
|
|
|
utl::MultiAtomProvider* m_pAtoms;
|
2002-02-28 10:53:08 +00:00
|
|
|
// for speeding up findFontFileID
|
2015-01-01 19:58:59 +00:00
|
|
|
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
|
|
|
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_map< OString, int, OStringHash >
|
2001-05-08 10:46:10 +00:00
|
|
|
m_aDirToAtom;
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_map< int, OString > m_aAtomToDir;
|
2001-06-25 13:40:25 +00:00
|
|
|
int m_nNextDirAtom;
|
|
|
|
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_multimap< OString, sal_Unicode, OStringHash >
|
2001-10-16 16:57:23 +00:00
|
|
|
m_aAdobenameToUnicode;
|
2015-01-01 19:58:59 +00:00
|
|
|
std::unordered_multimap< sal_Unicode, OString >
|
2001-10-16 16:57:23 +00:00
|
|
|
m_aUnicodeToAdobename;
|
2015-01-01 19:58:59 +00:00
|
|
|
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
|
|
|
|
2007-12-12 12:16:19 +00:00
|
|
|
mutable FontCache* m_pFontCache;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OString getAfmFile( PrintFont* pFont ) const;
|
|
|
|
OString getFontFile( PrintFont* pFont ) const;
|
2001-05-08 10:46:10 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
bool analyzeFontFile( int nDirID, const OString& rFileName, std::list< PrintFont* >& rNewFonts, const char *pFormat=NULL ) const;
|
2015-04-01 08:33:09 +02:00
|
|
|
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;
|
2012-01-11 11:03:55 +00:00
|
|
|
// finds the font id for the nFaceIndex face in this font file
|
|
|
|
// There may be multiple font ids for TrueType collections
|
2013-04-07 12:06:47 +02:00
|
|
|
fontID findFontFileID( int nDirID, const OString& rFile, int nFaceIndex ) const;
|
2012-01-11 11:03:55 +00:00
|
|
|
|
|
|
|
// There may be multiple font ids for TrueType collections
|
2013-04-07 12:06:47 +02:00
|
|
|
std::vector<fontID> findFontFileIDs( int nDirID, const OString& rFile ) const;
|
2012-01-11 11:03:55 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
bool knownFontFile( int nDirID, const OString& rFile ) const
|
2012-01-11 11:03:55 +00:00
|
|
|
{
|
|
|
|
return findFontFileID(nDirID, rFile, 0) != 0;
|
|
|
|
}
|
|
|
|
|
2015-04-01 08:33:09 +02:00
|
|
|
static FontFamily matchFamilyName( const OUString& rFamily );
|
2001-05-08 10:46:10 +00:00
|
|
|
|
|
|
|
PrintFont* getFont( fontID nID ) const
|
|
|
|
{
|
2015-01-01 19:58:59 +00:00
|
|
|
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;
|
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OString getDirectory( int nAtom ) const;
|
|
|
|
int getDirectoryAtom( const OString& rDirectory, bool bCreate = false );
|
2001-05-08 10:46:10 +00:00
|
|
|
|
2004-07-05 08:22:12 +00:00
|
|
|
/* try to initialize fonts from libfontconfig
|
|
|
|
|
|
|
|
called from <code>initialize()</code>
|
|
|
|
*/
|
2015-04-01 08:33:09 +02:00
|
|
|
static void initFontconfig();
|
2015-01-01 19:58:59 +00:00
|
|
|
void countFontconfigFonts( std::unordered_map<OString, int, OStringHash>& o_rVisitedPaths );
|
2004-07-05 08:22:12 +00:00
|
|
|
/* deinitialize fontconfig
|
|
|
|
*/
|
2015-04-01 08:33:09 +02:00
|
|
|
static void deinitFontconfig();
|
2004-03-15 11:03:07 +00:00
|
|
|
|
2007-12-12 12:16:19 +00:00
|
|
|
/* 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)
|
|
|
|
*/
|
2015-04-01 08:33:09 +02:00
|
|
|
static bool addFontconfigDir(const OString& rDirectory);
|
2007-12-12 12:16:19 +00:00
|
|
|
|
2012-09-03 13:17:09 +01:00
|
|
|
std::set<OString> m_aPreviousLangSupportRequests;
|
2012-09-03 16:59:48 +01:00
|
|
|
std::vector<OString> m_aCurrentRequests;
|
|
|
|
Timer m_aFontInstallerTimer;
|
|
|
|
|
2015-05-22 09:59:11 +02:00
|
|
|
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
|
2015-05-04 17:28:40 +02:00
|
|
|
DECL_LINK_TYPED( autoInstallFontLangSupport, Timer*, void );
|
2015-05-22 09:59:11 +02:00
|
|
|
#endif
|
2001-05-08 10:46:10 +00:00
|
|
|
PrintFontManager();
|
|
|
|
~PrintFontManager();
|
|
|
|
public:
|
|
|
|
static PrintFontManager& get(); // one instance only
|
|
|
|
|
2012-01-11 11:03:55 +00:00
|
|
|
// There may be multiple font ids for TrueType collections
|
2013-04-07 12:06:47 +02:00
|
|
|
std::vector<fontID> addFontFile( const OString& rFileName );
|
2001-05-08 10:46:10 +00:00
|
|
|
|
2009-03-06 09:33:41 +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(); }
|
2007-06-20 09:07:18 +00:00
|
|
|
|
2013-11-26 17:08:25 +02:00
|
|
|
// 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
|
2013-04-07 12:06:47 +02:00
|
|
|
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
|
2006-01-19 16:36:34 +00:00
|
|
|
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
|
2011-04-09 22:48:40 +02:00
|
|
|
FontItalic getFontItalic( fontID nFontID ) const
|
2001-05-08 10:46:10 +00:00
|
|
|
{
|
|
|
|
PrintFont* pFont = getFont( nFontID );
|
2011-04-09 22:48:40 +02:00
|
|
|
return pFont ? pFont->m_eItalic : ITALIC_DONTKNOW;
|
2001-05-08 10:46:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// get a specific fonts width type
|
2011-04-05 20:54:37 +02:00
|
|
|
FontWidth getFontWidth( fontID nFontID ) const
|
2001-05-08 10:46:10 +00:00
|
|
|
{
|
|
|
|
PrintFont* pFont = getFont( nFontID );
|
2011-04-05 20:54:37 +02:00
|
|
|
return pFont ? pFont->m_eWidth : WIDTH_DONTKNOW;
|
2001-05-08 10:46:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// get a specific fonts weight type
|
2011-04-06 22:13:21 +02:00
|
|
|
FontWeight getFontWeight( fontID nFontID ) const
|
2001-05-08 10:46:10 +00:00
|
|
|
{
|
|
|
|
PrintFont* pFont = getFont( nFontID );
|
2011-04-06 22:13:21 +02:00
|
|
|
return pFont ? pFont->m_eWeight : WEIGHT_DONTKNOW;
|
2001-05-08 10:46:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// get a specific fonts pitch type
|
2011-04-09 22:48:40 +02:00
|
|
|
FontPitch getFontPitch( fontID nFontID ) const
|
2001-05-08 10:46:10 +00:00
|
|
|
{
|
|
|
|
PrintFont* pFont = getFont( nFontID );
|
2011-04-09 22:48:40 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2003-06-30 13:25:57 +00:00
|
|
|
// should i only use font's builtin encoding ?
|
|
|
|
bool getUseOnlyFontEncoding( fontID nFontID ) const
|
|
|
|
{
|
|
|
|
PrintFont* pFont = getFont( nFontID );
|
2014-05-02 15:42:25 +02:00
|
|
|
return pFont && pFont->m_bFontEncodingOnly;
|
2003-06-30 13:25:57 +00:00
|
|
|
}
|
|
|
|
|
2001-05-08 10:46:10 +00:00
|
|
|
// get a specific fonts system dependent filename
|
2013-04-07 12:06:47 +02:00
|
|
|
OString getFontFileSysPath( fontID nFontID ) const
|
2001-05-08 10:46:10 +00:00
|
|
|
{
|
|
|
|
return getFontFile( getFont( nFontID ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
// get the ttc face number
|
2002-07-20 14:21:19 +00:00
|
|
|
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;
|
|
|
|
|
2002-07-20 14:21:19 +00:00
|
|
|
// get a fonts glyph bounding box
|
|
|
|
bool getFontBoundingBox( fontID nFont, int& xMin, int& yMin, int& xMax, int& yMax );
|
|
|
|
|
2001-12-21 15:31:36 +00:00
|
|
|
// 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;
|
|
|
|
|
2013-11-26 17:08:25 +02:00
|
|
|
// 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
|
2003-04-17 14:10:22 +00:00
|
|
|
// then *ppNonEncoded is set to the mapping for nonencoded glyphs.
|
|
|
|
// the encoding vector contains -1 for non encoded glyphs
|
2015-01-27 00:20:58 +01:00
|
|
|
const std::map< sal_Unicode, sal_Int32 >* getEncodingMap( fontID nFontID, const std::map< sal_Unicode, OString >** ppNonEncoded, std::set<sal_Unicode> const ** ppPriority ) const;
|
2003-04-17 14:10:22 +00:00
|
|
|
|
2013-03-07 20:07:15 +01:00
|
|
|
// evaluates copyright flags for TrueType fonts for printing/viewing
|
2001-06-08 15:32:30 +00:00
|
|
|
// type1 fonts do not have such a feature, so return for them is true
|
2013-03-07 20:07:15 +01:00
|
|
|
bool isFontDownloadingAllowedForPrinting( fontID nFont ) const;
|
2001-06-08 15:32:30 +00:00
|
|
|
|
2001-06-25 13:40:25 +00:00
|
|
|
// helper for type 1 fonts
|
2013-04-07 12:06:47 +02:00
|
|
|
std::list< OString > getAdobeNameFromUnicode( sal_Unicode aChar ) const;
|
2003-06-30 13:25:57 +00:00
|
|
|
|
2015-01-01 19:58:59 +00:00
|
|
|
std::pair< std::unordered_multimap< sal_Unicode, sal_uInt8 >::const_iterator,
|
|
|
|
std::unordered_multimap< sal_Unicode, sal_uInt8 >::const_iterator >
|
2001-10-16 16:57:23 +00:00
|
|
|
getAdobeCodeFromUnicode( sal_Unicode aChar ) const
|
2001-06-25 13:40:25 +00:00
|
|
|
{
|
2001-10-16 16:57:23 +00:00
|
|
|
return m_aUnicodeToAdobecode.equal_range( aChar );
|
2001-06-25 13:40:25 +00:00
|
|
|
}
|
2013-04-07 12:06:47 +02:00
|
|
|
std::list< sal_Unicode > getUnicodeFromAdobeName( const OString& rName ) const;
|
2015-01-01 19:58:59 +00:00
|
|
|
std::pair< std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator,
|
|
|
|
std::unordered_multimap< sal_uInt8, sal_Unicode >::const_iterator >
|
2001-10-16 16:57:23 +00:00
|
|
|
getUnicodeFromAdobeCode( sal_uInt8 aChar ) const
|
2001-06-25 13:40:25 +00:00
|
|
|
{
|
2001-10-16 16:57:23 +00:00
|
|
|
return m_aAdobecodeToUnicode.equal_range( aChar );
|
2001-06-25 13:40:25 +00:00
|
|
|
}
|
|
|
|
|
2002-07-20 14:21:19 +00:00
|
|
|
// 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
|
2009-08-27 12:02:29 +00:00
|
|
|
// TODO: callers of this method should use its FontSubsetInfo counterpart directly
|
|
|
|
bool createFontSubset( FontSubsetInfo&,
|
|
|
|
fontID nFont,
|
2013-04-07 12:06:47 +02:00
|
|
|
const OUString& rOutFile,
|
2015-01-26 21:22:26 +00:00
|
|
|
const sal_GlyphId* pGlyphIDs,
|
|
|
|
const sal_uInt8* pNewEncoding,
|
2002-07-20 14:21:19 +00:00
|
|
|
sal_Int32* pWidths,
|
|
|
|
int nGlyphs,
|
|
|
|
bool bVertical = false
|
|
|
|
);
|
2007-04-04 07:02:09 +00:00
|
|
|
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
|
|
|
|
|
2004-07-05 08:22:12 +00:00
|
|
|
/* 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>
|
|
|
|
|
2004-10-13 07:21:47 +00:00
|
|
|
@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
|
|
|
|
|
2004-07-05 08:22:12 +00:00
|
|
|
@returns
|
|
|
|
true if a match was found
|
|
|
|
false else
|
|
|
|
*/
|
2004-10-13 07:21:47 +00:00
|
|
|
bool matchFont( FastPrintFontInfo& rInfo, const com::sun::star::lang::Locale& rLocale );
|
2015-04-01 08:33:09 +02:00
|
|
|
static ImplFontOptions* getFontOptions( const FastPrintFontInfo&, int nSize, void (*subcallback)(void*));
|
2007-09-26 14:04:02 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
bool Substitute( FontSelectPattern &rPattern, OUString& rMissingCodes );
|
2007-12-12 12:16:19 +00:00
|
|
|
|
2007-09-26 14:04:02 +00:00
|
|
|
int FreeTypeCharIndex( void *pFace, sal_uInt32 aChar );
|
2001-05-08 10:46:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
2013-12-11 10:13:15 +02:00
|
|
|
#endif // INCLUDED_VCL_INC_FONTMANAGER_HXX
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|