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
1a302e71
Kaydet (Commit)
1a302e71
authored
Şub 18, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
risk converting ByteString to rtl::OString for OSes I don't have
üst
c251139c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
111 deletions
+111
-111
salinst.cxx
vcl/aqua/source/app/salinst.cxx
+18
-18
salatslayout.cxx
vcl/aqua/source/gdi/salatslayout.cxx
+2
-2
salatsuifontutils.cxx
vcl/aqua/source/gdi/salatsuifontutils.cxx
+71
-72
salgdi.cxx
vcl/aqua/source/gdi/salgdi.cxx
+3
-3
salinst.cxx
vcl/ios/source/app/salinst.cxx
+14
-13
salgdi.cxx
vcl/ios/source/gdi/salgdi.cxx
+3
-3
No files found.
vcl/aqua/source/app/salinst.cxx
Dosyayı görüntüle @
1a302e71
...
@@ -316,46 +316,46 @@ void InitSalMain()
...
@@ -316,46 +316,46 @@ void InitSalMain()
oslFileError
err2
=
osl_getSystemPathFromFileURL
(
urlWorkDir
.
pData
,
&
sysWorkDir
);
oslFileError
err2
=
osl_getSystemPathFromFileURL
(
urlWorkDir
.
pData
,
&
sysWorkDir
);
if
(
err2
==
osl_File_E_None
)
if
(
err2
==
osl_File_E_None
)
{
{
Byte
String
aPath
(
getenv
(
"PATH"
)
);
rtl
::
O
String
aPath
(
getenv
(
"PATH"
)
);
Byte
String
aResPath
(
getenv
(
"STAR_RESOURCEPATH"
)
);
rtl
::
O
String
aResPath
(
getenv
(
"STAR_RESOURCEPATH"
)
);
Byte
String
aLibPath
(
getenv
(
"DYLD_LIBRARY_PATH"
)
);
rtl
::
O
String
aLibPath
(
getenv
(
"DYLD_LIBRARY_PATH"
)
);
Byte
String
aCmdPath
(
OUStringToOString
(
OUString
(
sysWorkDir
),
RTL_TEXTENCODING_UTF8
).
getStr
()
);
rtl
::
O
String
aCmdPath
(
OUStringToOString
(
OUString
(
sysWorkDir
),
RTL_TEXTENCODING_UTF8
).
getStr
()
);
Byte
String
aTmpPath
;
rtl
::
O
String
aTmpPath
;
// Get absolute path of command's directory
// Get absolute path of command's directory
if
(
aCmdPath
.
Len
()
)
{
if
(
!
aCmdPath
.
isEmpty
()
)
{
DirEntry
aCmdDirEntry
(
aCmdPath
);
DirEntry
aCmdDirEntry
(
aCmdPath
);
aCmdDirEntry
.
ToAbs
();
aCmdDirEntry
.
ToAbs
();
aCmdPath
=
rtl
::
OUStringToOString
(
aCmdDirEntry
.
GetPath
().
GetFull
(),
RTL_TEXTENCODING_ASCII_US
);
aCmdPath
=
rtl
::
OUStringToOString
(
aCmdDirEntry
.
GetPath
().
GetFull
(),
RTL_TEXTENCODING_ASCII_US
);
}
}
// Assign to PATH environment variable
// Assign to PATH environment variable
if
(
aCmdPath
.
Len
()
)
if
(
!
aCmdPath
.
isEmpty
()
)
{
{
aTmpPath
=
Byte
String
(
"PATH="
);
aTmpPath
=
rtl
::
O
String
(
"PATH="
);
aTmpPath
+=
aCmdPath
;
aTmpPath
+=
aCmdPath
;
if
(
aPath
.
Len
()
)
if
(
!
aPath
.
isEmpty
()
)
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
aPath
;
aTmpPath
+=
aPath
;
putenv
(
(
char
*
)
aTmpPath
.
GetBuffe
r
()
);
putenv
(
(
char
*
)
aTmpPath
.
getSt
r
()
);
}
}
// Assign to STAR_RESOURCEPATH environment variable
// Assign to STAR_RESOURCEPATH environment variable
if
(
aCmdPath
.
Len
()
)
if
(
!
aCmdPath
.
isEmpty
()
)
{
{
aTmpPath
=
Byte
String
(
"STAR_RESOURCEPATH="
);
aTmpPath
=
rtl
::
O
String
(
"STAR_RESOURCEPATH="
);
aTmpPath
+=
aCmdPath
;
aTmpPath
+=
aCmdPath
;
if
(
aResPath
.
Len
()
)
if
(
!
aResPath
.
isEmpty
()
)
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
aResPath
;
aTmpPath
+=
aResPath
;
putenv
(
(
char
*
)
aTmpPath
.
GetBuffe
r
()
);
putenv
(
(
char
*
)
aTmpPath
.
getSt
r
()
);
}
}
// Assign to DYLD_LIBRARY_PATH environment variable
// Assign to DYLD_LIBRARY_PATH environment variable
if
(
aCmdPath
.
Len
()
)
if
(
!
aCmdPath
.
isEmpty
()
)
{
{
aTmpPath
=
Byte
String
(
"DYLD_LIBRARY_PATH="
);
aTmpPath
=
rtl
::
O
String
(
"DYLD_LIBRARY_PATH="
);
aTmpPath
+=
aCmdPath
;
aTmpPath
+=
aCmdPath
;
if
(
aLibPath
.
Len
()
)
if
(
!
aLibPath
.
isEmpty
()
)
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
aLibPath
;
aTmpPath
+=
aLibPath
;
putenv
(
(
char
*
)
aTmpPath
.
GetBuffe
r
()
);
putenv
(
(
char
*
)
aTmpPath
.
getSt
r
()
);
}
}
}
}
}
}
...
...
vcl/aqua/source/gdi/salatslayout.cxx
Dosyayı görüntüle @
1a302e71
...
@@ -239,9 +239,9 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
...
@@ -239,9 +239,9 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
ByteCount
nDummy
;
ByteCount
nDummy
;
ATSUGetAttribute
(
mrATSUStyle
,
kATSUSizeTag
,
sizeof
(
fFontSize
),
&
fFontSize
,
&
nDummy
);
ATSUGetAttribute
(
mrATSUStyle
,
kATSUSizeTag
,
sizeof
(
fFontSize
),
&
fFontSize
,
&
nDummy
);
String
aUniName
(
&
rArgs
.
mpStr
[
rArgs
.
mnMinCharPos
],
mnCharCount
);
String
aUniName
(
&
rArgs
.
mpStr
[
rArgs
.
mnMinCharPos
],
mnCharCount
);
ByteString
aCName
(
aUniName
,
RTL_TEXTENCODING_UTF8
);
rtl
::
OString
aCName
(
rtl
::
OUStringToOString
(
aUniName
,
RTL_TEXTENCODING_UTF8
)
);
fprintf
(
stderr
,
"ATSLayout(
\"
%s
\"
%d..%d of %d) with h=%4.1f
\n
"
,
fprintf
(
stderr
,
"ATSLayout(
\"
%s
\"
%d..%d of %d) with h=%4.1f
\n
"
,
aCName
.
GetBuffe
r
(),
rArgs
.
mnMinCharPos
,
rArgs
.
mnEndCharPos
,
rArgs
.
mnLength
,
Fix2X
(
fFontSize
)
);
aCName
.
getSt
r
(),
rArgs
.
mnMinCharPos
,
rArgs
.
mnEndCharPos
,
rArgs
.
mnLength
,
Fix2X
(
fFontSize
)
);
#endif
#endif
// create the ATSUI layout
// create the ATSUI layout
...
...
vcl/aqua/source/gdi/salatsuifontutils.cxx
Dosyayı görüntüle @
1a302e71
...
@@ -53,17 +53,16 @@
...
@@ -53,17 +53,16 @@
// and SFNT fonts on Mac usually do not contain an OS/2 table.
// and SFNT fonts on Mac usually do not contain an OS/2 table.
static
void
UpdateAttributesFromPSName
(
const
String
&
rPSName
,
ImplDevFontAttributes
&
rDFA
)
static
void
UpdateAttributesFromPSName
(
const
String
&
rPSName
,
ImplDevFontAttributes
&
rDFA
)
{
{
ByteString
aPSName
(
rtl
::
OUStringToOString
(
rPSName
,
RTL_TEXTENCODING_UTF8
)
);
rtl
::
OString
aPSName
(
rtl
::
OUStringToOString
(
rPSName
,
RTL_TEXTENCODING_UTF8
).
toAsciiLowerCase
()
);
aPSName
.
ToLowerAscii
();
// TODO: use a multi-string ignore-case matcher once it becomes available
// TODO: use a multi-string ignore-case matcher once it becomes available
if
(
(
aPSName
.
Search
(
"regular"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"regular"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"normal"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"normal"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"roman"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"roman"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"medium"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"medium"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"plain"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"plain"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"standard"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"standard"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"std"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"std"
)
!=
-
1
)
)
{
{
rDFA
.
meWidthType
=
WIDTH_NORMAL
;
rDFA
.
meWidthType
=
WIDTH_NORMAL
;
rDFA
.
meWeight
=
WEIGHT_NORMAL
;
rDFA
.
meWeight
=
WEIGHT_NORMAL
;
...
@@ -71,108 +70,108 @@ static void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttrib
...
@@ -71,108 +70,108 @@ static void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttrib
}
}
// heuristics for font weight
// heuristics for font weight
if
(
aPSName
.
Search
(
"extrablack"
)
!=
STRING_NOTFOUND
)
if
(
aPSName
.
indexOf
(
"extrablack"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_BLACK
;
rDFA
.
meWeight
=
WEIGHT_BLACK
;
else
if
(
aPSName
.
Search
(
"black"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"black"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_BLACK
;
rDFA
.
meWeight
=
WEIGHT_BLACK
;
//else if (aPSName.
Search("book") != STRING_NOTFOUND
)
//else if (aPSName.
indexOf("book") != -1
)
// rDFA.meWeight = WEIGHT_SEMIBOLD;
// rDFA.meWeight = WEIGHT_SEMIBOLD;
else
if
(
(
aPSName
.
Search
(
"semibold"
)
!=
STRING_NOTFOUND
)
else
if
(
(
aPSName
.
indexOf
(
"semibold"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"smbd"
)
!=
STRING_NOTFOUND
))
||
(
aPSName
.
indexOf
(
"smbd"
)
!=
-
1
))
rDFA
.
meWeight
=
WEIGHT_SEMIBOLD
;
rDFA
.
meWeight
=
WEIGHT_SEMIBOLD
;
else
if
(
aPSName
.
Search
(
"ultrabold"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"ultrabold"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_ULTRABOLD
;
rDFA
.
meWeight
=
WEIGHT_ULTRABOLD
;
else
if
(
aPSName
.
Search
(
"extrabold"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"extrabold"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_BLACK
;
rDFA
.
meWeight
=
WEIGHT_BLACK
;
else
if
(
(
aPSName
.
Search
(
"bold"
)
!=
STRING_NOTFOUND
)
else
if
(
(
aPSName
.
indexOf
(
"bold"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"-bd"
)
!=
STRING_NOTFOUND
))
||
(
aPSName
.
indexOf
(
"-bd"
)
!=
-
1
))
rDFA
.
meWeight
=
WEIGHT_BOLD
;
rDFA
.
meWeight
=
WEIGHT_BOLD
;
else
if
(
aPSName
.
Search
(
"extralight"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"extralight"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_ULTRALIGHT
;
rDFA
.
meWeight
=
WEIGHT_ULTRALIGHT
;
else
if
(
aPSName
.
Search
(
"ultralight"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"ultralight"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_ULTRALIGHT
;
rDFA
.
meWeight
=
WEIGHT_ULTRALIGHT
;
else
if
(
aPSName
.
Search
(
"light"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"light"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_LIGHT
;
rDFA
.
meWeight
=
WEIGHT_LIGHT
;
else
if
(
aPSName
.
Search
(
"thin"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"thin"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_THIN
;
rDFA
.
meWeight
=
WEIGHT_THIN
;
else
if
(
aPSName
.
Search
(
"-w3"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w3"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_LIGHT
;
rDFA
.
meWeight
=
WEIGHT_LIGHT
;
else
if
(
aPSName
.
Search
(
"-w4"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w4"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_SEMILIGHT
;
rDFA
.
meWeight
=
WEIGHT_SEMILIGHT
;
else
if
(
aPSName
.
Search
(
"-w5"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w5"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_NORMAL
;
rDFA
.
meWeight
=
WEIGHT_NORMAL
;
else
if
(
aPSName
.
Search
(
"-w6"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w6"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_SEMIBOLD
;
rDFA
.
meWeight
=
WEIGHT_SEMIBOLD
;
else
if
(
aPSName
.
Search
(
"-w7"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w7"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_BOLD
;
rDFA
.
meWeight
=
WEIGHT_BOLD
;
else
if
(
aPSName
.
Search
(
"-w8"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w8"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_ULTRABOLD
;
rDFA
.
meWeight
=
WEIGHT_ULTRABOLD
;
else
if
(
aPSName
.
Search
(
"-w9"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"-w9"
)
!=
-
1
)
rDFA
.
meWeight
=
WEIGHT_BLACK
;
rDFA
.
meWeight
=
WEIGHT_BLACK
;
// heuristics for font slant
// heuristics for font slant
if
(
(
aPSName
.
Search
(
"italic"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"italic"
)
!=
-
1
)
||
(
aPSName
.
Search
(
" ital"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
" ital"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"cursive"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"cursive"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"-it"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"-it"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"lightit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"lightit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"mediumit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"mediumit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"boldit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"boldit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"cnit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"cnit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"bdcn"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"bdcn"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"bdit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"bdit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"condit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"condit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"bookit"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"bookit"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"blackit"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"blackit"
)
!=
-
1
)
)
rDFA
.
meItalic
=
ITALIC_NORMAL
;
rDFA
.
meItalic
=
ITALIC_NORMAL
;
if
(
(
aPSName
.
Search
(
"oblique"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"oblique"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"inclined"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"inclined"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"slanted"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"slanted"
)
!=
-
1
)
)
rDFA
.
meItalic
=
ITALIC_OBLIQUE
;
rDFA
.
meItalic
=
ITALIC_OBLIQUE
;
// heuristics for font width
// heuristics for font width
if
(
(
aPSName
.
Search
(
"condensed"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"condensed"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"-cond"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"-cond"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"boldcond"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"boldcond"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"boldcn"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"boldcn"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"cnit"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"cnit"
)
!=
-
1
)
)
rDFA
.
meWidthType
=
WIDTH_CONDENSED
;
rDFA
.
meWidthType
=
WIDTH_CONDENSED
;
else
if
(
aPSName
.
Search
(
"narrow"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"narrow"
)
!=
-
1
)
rDFA
.
meWidthType
=
WIDTH_SEMI_CONDENSED
;
rDFA
.
meWidthType
=
WIDTH_SEMI_CONDENSED
;
else
if
(
aPSName
.
Search
(
"expanded"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"expanded"
)
!=
-
1
)
rDFA
.
meWidthType
=
WIDTH_EXPANDED
;
rDFA
.
meWidthType
=
WIDTH_EXPANDED
;
else
if
(
aPSName
.
Search
(
"wide"
)
!=
STRING_NOTFOUND
)
else
if
(
aPSName
.
indexOf
(
"wide"
)
!=
-
1
)
rDFA
.
meWidthType
=
WIDTH_EXPANDED
;
rDFA
.
meWidthType
=
WIDTH_EXPANDED
;
// heuristics for font pitch
// heuristics for font pitch
if
(
(
aPSName
.
Search
(
"mono"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"mono"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"courier"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"courier"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"monaco"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"monaco"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"typewriter"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"typewriter"
)
!=
-
1
)
)
rDFA
.
mePitch
=
PITCH_FIXED
;
rDFA
.
mePitch
=
PITCH_FIXED
;
// heuristics for font family type
// heuristics for font family type
if
(
(
aPSName
.
Search
(
"script"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"script"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"chancery"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"chancery"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"zapfino"
)
!=
STRING_NOTFOUND
))
||
(
aPSName
.
indexOf
(
"zapfino"
)
!=
-
1
))
rDFA
.
meFamily
=
FAMILY_SCRIPT
;
rDFA
.
meFamily
=
FAMILY_SCRIPT
;
else
if
(
(
aPSName
.
Search
(
"comic"
)
!=
STRING_NOTFOUND
)
else
if
(
(
aPSName
.
indexOf
(
"comic"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"outline"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"outline"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"pinpoint"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"pinpoint"
)
!=
-
1
)
)
rDFA
.
meFamily
=
FAMILY_DECORATIVE
;
rDFA
.
meFamily
=
FAMILY_DECORATIVE
;
else
if
(
(
aPSName
.
Search
(
"sans"
)
!=
STRING_NOTFOUND
)
else
if
(
(
aPSName
.
indexOf
(
"sans"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"arial"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"arial"
)
!=
-
1
)
)
rDFA
.
meFamily
=
FAMILY_SWISS
;
rDFA
.
meFamily
=
FAMILY_SWISS
;
else
if
(
(
aPSName
.
Search
(
"roman"
)
!=
STRING_NOTFOUND
)
else
if
(
(
aPSName
.
indexOf
(
"roman"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"times"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"times"
)
!=
-
1
)
)
rDFA
.
meFamily
=
FAMILY_ROMAN
;
rDFA
.
meFamily
=
FAMILY_ROMAN
;
// heuristics for codepoint semantic
// heuristics for codepoint semantic
if
(
(
aPSName
.
Search
(
"symbol"
)
!=
STRING_NOTFOUND
)
if
(
(
aPSName
.
indexOf
(
"symbol"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"dings"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"dings"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"dingbats"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"dingbats"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"ornaments"
)
!=
STRING_NOTFOUND
)
||
(
aPSName
.
indexOf
(
"ornaments"
)
!=
-
1
)
||
(
aPSName
.
Search
(
"embellishments"
)
!=
STRING_NOTFOUND
)
)
||
(
aPSName
.
indexOf
(
"embellishments"
)
!=
-
1
)
)
rDFA
.
mbSymbolFlag
=
true
;
rDFA
.
mbSymbolFlag
=
true
;
// #i100020# special heuristic for names with single-char styles
// #i100020# special heuristic for names with single-char styles
...
...
vcl/aqua/source/gdi/salgdi.cxx
Dosyayı görüntüle @
1a302e71
...
@@ -2222,7 +2222,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
...
@@ -2222,7 +2222,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
if
(
osl_File_E_None
!=
osl_getSystemPathFromFileURL
(
rToFile
.
pData
,
&
aSysPath
.
pData
)
)
if
(
osl_File_E_None
!=
osl_getSystemPathFromFileURL
(
rToFile
.
pData
,
&
aSysPath
.
pData
)
)
return
sal_False
;
return
sal_False
;
const
rtl_TextEncoding
aThreadEncoding
=
osl_getThreadTextEncoding
();
const
rtl_TextEncoding
aThreadEncoding
=
osl_getThreadTextEncoding
();
const
Byte
String
aToFile
(
rtl
::
OUStringToOString
(
aSysPath
,
aThreadEncoding
)
);
const
rtl
::
O
String
aToFile
(
rtl
::
OUStringToOString
(
aSysPath
,
aThreadEncoding
)
);
// get the raw-bytes from the font to be subset
// get the raw-bytes from the font to be subset
ByteVector
aBuffer
;
ByteVector
aBuffer
;
...
@@ -2240,7 +2240,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
...
@@ -2240,7 +2240,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// NOTE: assuming that all glyphids requested on Aqua are fully translated
// NOTE: assuming that all glyphids requested on Aqua are fully translated
// make the subsetter provide the requested subset
// make the subsetter provide the requested subset
FILE
*
pOutFile
=
fopen
(
aToFile
.
GetBuffe
r
(),
"wb"
);
FILE
*
pOutFile
=
fopen
(
aToFile
.
getSt
r
(),
"wb"
);
bool
bRC
=
rInfo
.
CreateFontSubset
(
FontSubsetInfo
::
TYPE1_PFB
,
pOutFile
,
NULL
,
bool
bRC
=
rInfo
.
CreateFontSubset
(
FontSubsetInfo
::
TYPE1_PFB
,
pOutFile
,
NULL
,
pGlyphIDs
,
pEncoding
,
nGlyphCount
,
pGlyphWidths
);
pGlyphIDs
,
pEncoding
,
nGlyphCount
,
pGlyphWidths
);
fclose
(
pOutFile
);
fclose
(
pOutFile
);
...
@@ -2338,7 +2338,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
...
@@ -2338,7 +2338,7 @@ sal_Bool AquaSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
free
(
pGlyphMetrics
);
free
(
pGlyphMetrics
);
// write subset into destination file
// write subset into destination file
nRC
=
::
CreateTTFromTTGlyphs
(
pSftFont
,
aToFile
.
GetBuffe
r
(),
aShortIDs
,
nRC
=
::
CreateTTFromTTGlyphs
(
pSftFont
,
aToFile
.
getSt
r
(),
aShortIDs
,
aTempEncs
,
nGlyphCount
,
0
,
NULL
,
0
);
aTempEncs
,
nGlyphCount
,
0
,
NULL
,
0
);
::
CloseTTFont
(
pSftFont
);
::
CloseTTFont
(
pSftFont
);
return
(
nRC
==
SF_OK
);
return
(
nRC
==
SF_OK
);
...
...
vcl/ios/source/app/salinst.cxx
Dosyayı görüntüle @
1a302e71
...
@@ -189,35 +189,36 @@ void InitSalMain()
...
@@ -189,35 +189,36 @@ void InitSalMain()
oslFileError
err2
=
osl_getSystemPathFromFileURL
(
urlWorkDir
.
pData
,
&
sysWorkDir
);
oslFileError
err2
=
osl_getSystemPathFromFileURL
(
urlWorkDir
.
pData
,
&
sysWorkDir
);
if
(
err2
==
osl_File_E_None
)
if
(
err2
==
osl_File_E_None
)
{
{
Byte
String
aPath
(
getenv
(
"PATH"
)
);
rtl
::
O
String
aPath
(
getenv
(
"PATH"
)
);
Byte
String
aResPath
(
getenv
(
"STAR_RESOURCEPATH"
)
);
rtl
::
O
String
aResPath
(
getenv
(
"STAR_RESOURCEPATH"
)
);
Byte
String
aCmdPath
(
OUStringToOString
(
OUString
(
sysWorkDir
),
RTL_TEXTENCODING_UTF8
).
getStr
()
);
rtl
::
O
String
aCmdPath
(
OUStringToOString
(
OUString
(
sysWorkDir
),
RTL_TEXTENCODING_UTF8
).
getStr
()
);
Byte
String
aTmpPath
;
rtl
::
O
String
aTmpPath
;
// Get absolute path of command's directory
// Get absolute path of command's directory
if
(
aCmdPath
.
Len
()
)
{
if
(
!
aCmdPath
.
isEmpty
()
)
{
DirEntry
aCmdDirEntry
(
aCmdPath
);
DirEntry
aCmdDirEntry
(
aCmdPath
);
aCmdDirEntry
.
ToAbs
();
aCmdDirEntry
.
ToAbs
();
aCmdPath
=
rtl
::
OUStringToOString
(
aCmdDirEntry
.
GetPath
().
GetFull
(),
RTL_TEXTENCODING_ASCII_US
);
aCmdPath
=
rtl
::
OUStringToOString
(
aCmdDirEntry
.
GetPath
().
GetFull
(),
RTL_TEXTENCODING_ASCII_US
);
}
}
// Assign to PATH environment variable
// Assign to PATH environment variable
if
(
aCmdPath
.
Len
()
)
if
(
!
aCmdPath
.
isEmpty
()
)
{
{
aTmpPath
=
Byte
String
(
"PATH="
);
aTmpPath
=
rtl
::
O
String
(
"PATH="
);
aTmpPath
+=
aCmdPath
;
aTmpPath
+=
aCmdPath
;
if
(
aPath
.
Len
()
)
if
(
!
aPath
.
isEmpty
()
)
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
aPath
;
aTmpPath
+=
aPath
;
putenv
(
(
char
*
)
aTmpPath
.
GetBuffe
r
()
);
putenv
(
(
char
*
)
aTmpPath
.
getSt
r
()
);
}
}
// Assign to STAR_RESOURCEPATH environment variable
// Assign to STAR_RESOURCEPATH environment variable
if
(
aCmdPath
.
Len
()
)
if
(
!
aCmdPath
.
isEmpty
()
)
{
{
aTmpPath
=
Byte
String
(
"STAR_RESOURCEPATH="
);
aTmpPath
=
rtl
::
O
String
(
"STAR_RESOURCEPATH="
);
aTmpPath
+=
aCmdPath
;
aTmpPath
+=
aCmdPath
;
if
(
aResPath
.
Len
()
)
if
(
!
aResPath
.
isEmpty
()
)
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
rtl
::
OUStringToOString
(
DirEntry
::
GetSearchDelimiter
(),
RTL_TEXTENCODING_ASCII_US
);
aTmpPath
+=
aResPath
;
aTmpPath
+=
aResPath
;
putenv
(
(
char
*
)
aTmpPath
.
GetBuffe
r
()
);
putenv
(
(
char
*
)
aTmpPath
.
getSt
r
()
);
}
}
}
}
}
}
...
...
vcl/ios/source/gdi/salgdi.cxx
Dosyayı görüntüle @
1a302e71
...
@@ -1940,7 +1940,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
...
@@ -1940,7 +1940,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
if
(
osl_File_E_None
!=
osl_getSystemPathFromFileURL
(
rToFile
.
pData
,
&
aSysPath
.
pData
)
)
if
(
osl_File_E_None
!=
osl_getSystemPathFromFileURL
(
rToFile
.
pData
,
&
aSysPath
.
pData
)
)
return
sal_False
;
return
sal_False
;
const
rtl_TextEncoding
aThreadEncoding
=
osl_getThreadTextEncoding
();
const
rtl_TextEncoding
aThreadEncoding
=
osl_getThreadTextEncoding
();
const
Byte
String
aToFile
(
rtl
::
OUStringToOString
(
aSysPath
,
aThreadEncoding
)
);
const
rtl
::
O
String
aToFile
(
rtl
::
OUStringToOString
(
aSysPath
,
aThreadEncoding
)
);
// get the raw-bytes from the font to be subset
// get the raw-bytes from the font to be subset
ByteVector
aBuffer
;
ByteVector
aBuffer
;
...
@@ -1958,7 +1958,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
...
@@ -1958,7 +1958,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
// NOTE: assuming that all glyphids requested on Ios are fully translated
// NOTE: assuming that all glyphids requested on Ios are fully translated
// make the subsetter provide the requested subset
// make the subsetter provide the requested subset
FILE
*
pOutFile
=
fopen
(
aToFile
.
GetBuffe
r
(),
"wb"
);
FILE
*
pOutFile
=
fopen
(
aToFile
.
getSt
r
(),
"wb"
);
bool
bRC
=
rInfo
.
CreateFontSubset
(
FontSubsetInfo
::
TYPE1_PFB
,
pOutFile
,
NULL
,
bool
bRC
=
rInfo
.
CreateFontSubset
(
FontSubsetInfo
::
TYPE1_PFB
,
pOutFile
,
NULL
,
pGlyphIDs
,
pEncoding
,
nGlyphCount
,
pGlyphWidths
);
pGlyphIDs
,
pEncoding
,
nGlyphCount
,
pGlyphWidths
);
fclose
(
pOutFile
);
fclose
(
pOutFile
);
...
@@ -2056,7 +2056,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
...
@@ -2056,7 +2056,7 @@ sal_Bool IosSalGraphics::CreateFontSubset( const rtl::OUString& rToFile,
free
(
pGlyphMetrics
);
free
(
pGlyphMetrics
);
// write subset into destination file
// write subset into destination file
nRC
=
::
CreateTTFromTTGlyphs
(
pSftFont
,
aToFile
.
GetBuffe
r
(),
aShortIDs
,
nRC
=
::
CreateTTFromTTGlyphs
(
pSftFont
,
aToFile
.
getSt
r
(),
aShortIDs
,
aTempEncs
,
nGlyphCount
,
0
,
NULL
,
0
);
aTempEncs
,
nGlyphCount
,
0
,
NULL
,
0
);
::
CloseTTFont
(
pSftFont
);
::
CloseTTFont
(
pSftFont
);
return
(
nRC
==
SF_OK
);
return
(
nRC
==
SF_OK
);
...
...
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