Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
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
sdkjs
Commits
1442522b
Commit
1442522b
authored
Jul 05, 2016
by
alexey.musinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 32777
parent
541b8b15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
build/configs/webexcel.json
build/configs/webexcel.json
+2
-0
cell/native/TextDrawer.js
cell/native/TextDrawer.js
+22
-0
No files found.
build/configs/webexcel.json
View file @
1442522b
...
...
@@ -211,6 +211,7 @@
"../common/Native/Wrappers/TextMeasurerWrapper.js"
,
"../common/Native/Wrappers/DrawingStream.js"
,
"../common/Native/Wrappers/ShapeDrawer.js"
,
"../cell/native/TextDrawer.js"
,
"../cell/native/Overlay.js"
,
"../cell/native/Graphics.js"
,
"../cell/native/DrawingDocument.js"
,
...
...
@@ -227,6 +228,7 @@
"../common/FontsFreeType/FontManager.js"
,
"../common/FontsFreeType/TextMeasurer.js"
,
"../cell/model/DrawingObjects/Graphics.js"
,
"../common/Drawings/TextDrawer.js"
,
"../cell/view/iscroll.js"
],
"dst"
:
"../cell"
,
...
...
cell/native/TextDrawer.js
100644 → 100755
View file @
1442522b
...
...
@@ -34,6 +34,13 @@
(
function
(
window
,
undefined
)
{
// Import
var
g_fontApplication
=
AscFonts
.
g_fontApplication
;
var
Geometry
=
AscFormat
.
Geometry
;
var
EPSILON_TEXT_AUTOFIT
=
AscFormat
.
EPSILON_TEXT_AUTOFIT
;
var
ObjectToDraw
=
AscFormat
.
ObjectToDraw
;
var
PATH_DIV_EPSILON
=
0.1
;
var
UNDERLINE_DIV_EPSILON
=
3
;
...
...
@@ -1562,11 +1569,13 @@ CTextDrawer.prototype =
{
this
.
Get_PathToDraw
(
false
,
true
,
x
,
y
);
}
AscCommon
.
g_oTextMeasurer
.
SetFontInternal
(
this
.
m_oFont
.
Name
,
this
.
m_oFont
.
FontSize
,
Math
.
max
(
this
.
m_oFont
.
Style
,
0
));
if
(
null
!=
this
.
LastFontOriginInfo
.
Replace
)
{
code
=
AscFonts
.
g_fontApplication
.
GetReplaceGlyph
(
code
,
this
.
LastFontOriginInfo
.
Replace
);
//code = AscFonts.g_fontApplication.GetReplaceGlyph(code, this.LastFontOriginInfo.Replace);
}
window
[
"
native
"
][
"
PD_FillText
"
](
x
,
y
,
code
);
// TODO:
...
...
@@ -1576,6 +1585,7 @@ CTextDrawer.prototype =
{
AscCommon
.
g_oTextMeasurer
.
SetFontInternal
(
this
.
m_oFont
.
Name
,
this
.
m_oFont
.
FontSize
,
Math
.
max
(
this
.
m_oFont
.
Style
,
0
));
window
[
"
native
"
][
"
PD_FillTextG
"
](
x
,
y
,
gid
);
// TODO:
// g_oTextMeasurer.m_oManager.LoadStringPathCode(gid, true, x, y, this);
},
charspace
:
function
(
space
)
...
...
@@ -2515,6 +2525,18 @@ function GetRectContentWidth(oContent, dMaxWidth)
}
//--------------------------------------------------------export----------------------------------------------------
window
[
'
AscFormat
'
]
=
window
[
'
AscFormat
'
]
||
{};
window
[
'
AscFormat
'
].
PATH_DIV_EPSILON
=
PATH_DIV_EPSILON
;
window
[
'
AscFormat
'
].
ParaDrawingStruct
=
ParaDrawingStruct
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_TABLE
=
DRAW_COMMAND_TABLE
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_CONTENT
=
DRAW_COMMAND_CONTENT
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_PARAGRAPH
=
DRAW_COMMAND_PARAGRAPH
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_LINE
=
DRAW_COMMAND_LINE
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_DRAWING
=
DRAW_COMMAND_DRAWING
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_HIDDEN_ELEM
=
DRAW_COMMAND_HIDDEN_ELEM
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_NO_CREATE_GEOM
=
DRAW_COMMAND_NO_CREATE_GEOM
;
window
[
'
AscFormat
'
].
DRAW_COMMAND_TABLE_ROW
=
DRAW_COMMAND_TABLE_ROW
;
window
[
'
AscFormat
'
].
CreatePenFromParams
=
CreatePenFromParams
;
window
[
'
AscFormat
'
].
CTextDrawer
=
CTextDrawer
;
window
[
'
AscFormat
'
].
PolygonWrapper
=
PolygonWrapper
;
window
[
'
AscFormat
'
].
GetRectContentWidth
=
GetRectContentWidth
;
})(
window
);
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