Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
45c2f923
Commit
45c2f923
authored
Aug 11, 2016
by
Ilya Kirillov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with relative font url.
parent
100fb404
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
XpsFile/XpsLib/FontList.h
XpsFile/XpsLib/FontList.h
+5
-2
XpsFile/XpsLib/Page.cpp
XpsFile/XpsLib/Page.cpp
+16
-1
No files found.
XpsFile/XpsLib/FontList.h
View file @
45c2f923
...
...
@@ -79,8 +79,11 @@ namespace XPS
sFontData
[
nIndex
]
^=
sKey
[
nIndex
%
16
];
FILE
*
pFile
=
oFile
.
GetFileNative
();
fseek
(
pFile
,
0
,
SEEK_SET
);
fwrite
(
sFontData
,
1
,
32
,
pFile
);
if
(
pFile
)
{
fseek
(
pFile
,
0
,
SEEK_SET
);
fwrite
(
sFontData
,
1
,
32
,
pFile
);
}
oFile
.
CloseFile
();
}
...
...
XpsFile/XpsLib/Page.cpp
View file @
45c2f923
...
...
@@ -437,7 +437,22 @@ namespace XPS
{
wsFontPath
=
oReader
.
GetText
();
std
::
wstring
wsFontName
=
GetFileName
(
wsFontPath
);
wsFontPath
=
m_wsRootPath
+
L"/"
+
wsFontPath
;
if
(
wsFontPath
.
length
()
>=
0
&&
'.'
==
wsFontPath
.
at
(
0
))
{
int
nSlashPos
=
m_wsPagePath
.
find_last_of
(
L'/'
);
if
(
std
::
wstring
::
npos
==
nSlashPos
)
nSlashPos
=
-
1
;
std
::
wstring
wsRelativePath
=
(
std
::
wstring
::
npos
==
nSlashPos
)
?
m_wsPagePath
:
m_wsPagePath
.
substr
(
0
,
nSlashPos
+
1
);
wsFontPath
=
wsRelativePath
+
wsFontPath
;
}
else
{
wsFontPath
=
m_wsRootPath
+
L"/"
+
wsFontPath
;
}
std
::
wstring
wsExt
=
GetFileExtension
(
wsFontPath
);
NSStringExt
::
ToLower
(
wsExt
);
if
(
L"odttf"
==
wsExt
)
...
...
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