Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
72fe5a60
Kaydet (Commit)
72fe5a60
authored
Haz 22, 2015
tarafından
Michael Meeks
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Re-factor AddTempDevFont to share it with headless backend.
Change-Id: Ic316b18eace3445edef346fe319cbb0e557607fa
üst
801f24f0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
35 deletions
+47
-35
genpspgraphics.cxx
vcl/generic/print/genpspgraphics.cxx
+37
-0
svptextrender.cxx
vcl/headless/svptextrender.cxx
+4
-3
genpspgraphics.h
vcl/inc/generic/genpspgraphics.h
+5
-0
cairotextrender.cxx
vcl/unx/generic/gdi/cairotextrender.cxx
+1
-32
No files found.
vcl/generic/print/genpspgraphics.cxx
Dosyayı görüntüle @
72fe5a60
...
@@ -872,6 +872,43 @@ bool GenPspGraphics::AddTempDevFont( PhysicalFontCollection*, const OUString&,co
...
@@ -872,6 +872,43 @@ bool GenPspGraphics::AddTempDevFont( PhysicalFontCollection*, const OUString&,co
return
false
;
return
false
;
}
}
bool
GenPspGraphics
::
AddTempDevFontHelper
(
PhysicalFontCollection
*
pFontCollection
,
const
OUString
&
rFileURL
,
const
OUString
&
rFontName
,
GlyphCache
&
rGC
)
{
// inform PSP font manager
OUString
aUSystemPath
;
OSL_VERIFY
(
!
osl
::
FileBase
::
getSystemPathFromFileURL
(
rFileURL
,
aUSystemPath
)
);
rtl_TextEncoding
aEncoding
=
osl_getThreadTextEncoding
();
OString
aOFileName
(
OUStringToOString
(
aUSystemPath
,
aEncoding
)
);
psp
::
PrintFontManager
&
rMgr
=
psp
::
PrintFontManager
::
get
();
std
::
vector
<
psp
::
fontID
>
aFontIds
=
rMgr
.
addFontFile
(
aOFileName
);
if
(
aFontIds
.
empty
()
)
return
false
;
for
(
std
::
vector
<
psp
::
fontID
>::
iterator
aI
=
aFontIds
.
begin
(),
aEnd
=
aFontIds
.
end
();
aI
!=
aEnd
;
++
aI
)
{
// prepare font data
psp
::
FastPrintFontInfo
aInfo
;
rMgr
.
getFontFastInfo
(
*
aI
,
aInfo
);
aInfo
.
m_aFamilyName
=
rFontName
;
// inform glyph cache of new font
ImplDevFontAttributes
aDFA
=
GenPspGraphics
::
Info2DevFontAttributes
(
aInfo
);
aDFA
.
mnQuality
+=
5800
;
int
nFaceNum
=
rMgr
.
getFontFaceNumber
(
aInfo
.
m_nID
);
const
OString
&
rFileName
=
rMgr
.
getFontFileSysPath
(
aInfo
.
m_nID
);
rGC
.
AddFontFile
(
rFileName
,
nFaceNum
,
aInfo
.
m_nID
,
aDFA
);
}
// announce new font to device's font list
rGC
.
AnnounceFonts
(
pFontCollection
);
return
true
;
}
void
GenPspGraphics
::
GetDevFontList
(
PhysicalFontCollection
*
pFontCollection
)
void
GenPspGraphics
::
GetDevFontList
(
PhysicalFontCollection
*
pFontCollection
)
{
{
::
std
::
list
<
psp
::
fontID
>
aList
;
::
std
::
list
<
psp
::
fontID
>
aList
;
...
...
vcl/headless/svptextrender.cxx
Dosyayı görüntüle @
72fe5a60
...
@@ -291,10 +291,11 @@ void SvpTextRender::ClearDevFontCache()
...
@@ -291,10 +291,11 @@ void SvpTextRender::ClearDevFontCache()
rGC
.
ClearFontCache
();
rGC
.
ClearFontCache
();
}
}
bool
SvpTextRender
::
AddTempDevFont
(
PhysicalFontCollection
*
,
bool
SvpTextRender
::
AddTempDevFont
(
PhysicalFontCollection
*
pFontCollection
,
const
OUString
&
,
const
OUString
&
)
const
OUString
&
rFileURL
,
const
OUString
&
rFontName
)
{
{
return
false
;
return
GenPspGraphics
::
AddTempDevFontHelper
(
pFontCollection
,
rFileURL
,
rFontName
,
SvpGlyphCache
::
GetInstance
()
)
;
}
}
bool
SvpTextRender
::
CreateFontSubset
(
bool
SvpTextRender
::
CreateFontSubset
(
...
...
vcl/inc/generic/genpspgraphics.h
Dosyayı görüntüle @
72fe5a60
...
@@ -35,6 +35,7 @@ namespace psp { struct JobData; class PrinterGfx; }
...
@@ -35,6 +35,7 @@ namespace psp { struct JobData; class PrinterGfx; }
class
ServerFont
;
class
ServerFont
;
class
ImplDevFontAttributes
;
class
ImplDevFontAttributes
;
class
SalInfoPrinter
;
class
SalInfoPrinter
;
class
GlyphCache
;
class
VCL_DLLPUBLIC
GenPspGraphics
:
public
SalGraphics
class
VCL_DLLPUBLIC
GenPspGraphics
:
public
SalGraphics
{
{
...
@@ -99,6 +100,10 @@ public:
...
@@ -99,6 +100,10 @@ public:
virtual
bool
AddTempDevFont
(
PhysicalFontCollection
*
,
virtual
bool
AddTempDevFont
(
PhysicalFontCollection
*
,
const
OUString
&
rFileURL
,
const
OUString
&
rFileURL
,
const
OUString
&
rFontName
)
SAL_OVERRIDE
;
const
OUString
&
rFontName
)
SAL_OVERRIDE
;
static
bool
AddTempDevFontHelper
(
PhysicalFontCollection
*
pFontCollection
,
const
OUString
&
rFileURL
,
const
OUString
&
rFontName
,
GlyphCache
&
rGC
);
virtual
bool
CreateFontSubset
(
const
OUString
&
rToFile
,
virtual
bool
CreateFontSubset
(
const
OUString
&
rToFile
,
const
PhysicalFontFace
*
,
const
PhysicalFontFace
*
,
...
...
vcl/unx/generic/gdi/cairotextrender.cxx
Dosyayı görüntüle @
72fe5a60
...
@@ -386,38 +386,7 @@ bool CairoTextRender::AddTempDevFont( PhysicalFontCollection* pFontCollection,
...
@@ -386,38 +386,7 @@ bool CairoTextRender::AddTempDevFont( PhysicalFontCollection* pFontCollection,
const
OUString
&
rFileURL
,
const
OUString
&
rFileURL
,
const
OUString
&
rFontName
)
const
OUString
&
rFontName
)
{
{
// inform PSP font manager
return
GenPspGraphics
::
AddTempDevFontHelper
(
pFontCollection
,
rFileURL
,
rFontName
,
getPlatformGlyphCache
()
);
OUString
aUSystemPath
;
OSL_VERIFY
(
!
osl
::
FileBase
::
getSystemPathFromFileURL
(
rFileURL
,
aUSystemPath
)
);
rtl_TextEncoding
aEncoding
=
osl_getThreadTextEncoding
();
OString
aOFileName
(
OUStringToOString
(
aUSystemPath
,
aEncoding
)
);
psp
::
PrintFontManager
&
rMgr
=
psp
::
PrintFontManager
::
get
();
std
::
vector
<
psp
::
fontID
>
aFontIds
=
rMgr
.
addFontFile
(
aOFileName
);
if
(
aFontIds
.
empty
()
)
return
false
;
GlyphCache
&
rGC
=
getPlatformGlyphCache
();
for
(
std
::
vector
<
psp
::
fontID
>::
iterator
aI
=
aFontIds
.
begin
(),
aEnd
=
aFontIds
.
end
();
aI
!=
aEnd
;
++
aI
)
{
// prepare font data
psp
::
FastPrintFontInfo
aInfo
;
rMgr
.
getFontFastInfo
(
*
aI
,
aInfo
);
aInfo
.
m_aFamilyName
=
rFontName
;
// inform glyph cache of new font
ImplDevFontAttributes
aDFA
=
GenPspGraphics
::
Info2DevFontAttributes
(
aInfo
);
aDFA
.
mnQuality
+=
5800
;
int
nFaceNum
=
rMgr
.
getFontFaceNumber
(
aInfo
.
m_nID
);
const
OString
&
rFileName
=
rMgr
.
getFontFileSysPath
(
aInfo
.
m_nID
);
rGC
.
AddFontFile
(
rFileName
,
nFaceNum
,
aInfo
.
m_nID
,
aDFA
);
}
// announce new font to device's font list
rGC
.
AnnounceFonts
(
pFontCollection
);
return
true
;
}
}
void
CairoTextRender
::
ClearDevFontCache
()
void
CairoTextRender
::
ClearDevFontCache
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment