Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
ea9217ad
Commit
ea9217ad
authored
Jul 02, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove text size hack. Not so efficient
parent
aba0f8a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+3
-14
No files found.
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
ea9217ad
...
...
@@ -2266,20 +2266,9 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::textItemToSvg(UBGraphicsTextItem* it
//for new documents from version 4.5.0
mXmlWriter
.
writeStartElement
(
"itemTextContent"
);
//TODO:
// This is only a workaround that works quite well. The font sizes are expressed on
// px instead of pt because px is less sensitive to the physicalDPI of the Os. The
// main problem in fact appears when the file is used on another platform than the
// one used to create it.
// But a different solution has to be implemented to avoid some annoying case that
// are already present with this hack.
QString
htmlString
=
item
->
toHtml
();
qDebug
()
<<
htmlString
;
QRegExp
regExp
(
"font-size:([0-9]{,3})pt"
);
htmlString
=
htmlString
.
replace
(
regExp
,
"font-size:
\\
1px"
);
qDebug
()
<<
htmlString
;
//mXmlWriter.writeCDATA(htmlString);
mXmlWriter
.
writeCharacters
(
htmlString
);
// Note: don't use mXmlWriter.writeCDATA(htmlString); because it doesn't escape characters sequences correctly.
// Texts copied from other programs like Open-Office can truncate the svg file.
mXmlWriter
.
writeCharacters
(
item
->
toHtml
());
mXmlWriter
.
writeEndElement
();
//itemTextContent
mXmlWriter
.
writeEndElement
();
//foreignObject
...
...
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