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
377b84eb
Commit
377b84eb
authored
Mar 26, 2016
by
Oleg Korshul
Committed by
Alexander.Trofimov
May 19, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
добавлена возможность не добавлять смещение в "самопальных" болдах
parent
77ef6d37
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
common/FontsFreeType/FontFile.js
common/FontsFreeType/FontFile.js
+5
-5
common/FontsFreeType/FontManager.js
common/FontsFreeType/FontManager.js
+8
-1
No files found.
common/FontsFreeType/FontFile.js
View file @
377b84eb
...
...
@@ -607,7 +607,7 @@ function CFontFile(fileName, faceIndex)
oSizes
.
oBBox
.
fMinY
=
(
yMin
>>
6
);
oSizes
.
oBBox
.
fMaxY
=
(
yMax
>>
6
);
if
(
this
.
m_bNeedDoBold
)
if
(
this
.
m_bNeedDoBold
&&
this
.
m_oFontManager
.
IsAdvanceNeedBoldFonts
)
oSizes
.
fAdvanceX
+=
1
;
var
dstM
=
oSizes
.
oMetrics
;
...
...
@@ -686,7 +686,7 @@ function CFontFile(fileName, faceIndex)
pString
.
SetBBox
(
nIndex
,
charSymbolObj
.
oBBox
.
fMinX
,
charSymbolObj
.
oBBox
.
fMaxY
,
charSymbolObj
.
oBBox
.
fMaxX
,
charSymbolObj
.
oBBox
.
fMinY
);
fPenX
+=
charSymbolObj
.
fAdvanceX
+
this
.
m_fCharSpacing
;
if
(
this
.
m_bNeedDoBold
)
if
(
this
.
m_bNeedDoBold
&&
this
.
m_oFontManager
.
IsAdvanceNeedBoldFonts
)
{
// Когда текст делаем жирным сами, то мы увеличиваем расстояние на 1 пиксель в ширину (независимо от DPI и размера текста всегда 1 пиксель)
fPenX
+=
1
;
...
...
@@ -958,7 +958,7 @@ function CFontFile(fileName, faceIndex)
pString
.
SetBBox
(
nIndex
,
charSymbolObj
.
oBBox
.
fMinX
,
charSymbolObj
.
oBBox
.
fMaxY
,
charSymbolObj
.
oBBox
.
fMaxX
,
charSymbolObj
.
oBBox
.
fMinY
);
fPenX
+=
charSymbolObj
.
fAdvanceX
+
this
.
m_fCharSpacing
;
if
(
this
.
m_bNeedDoBold
)
if
(
this
.
m_bNeedDoBold
&&
this
.
m_oFontManager
.
IsAdvanceNeedBoldFonts
)
{
// Когда текст делаем жирным сами, то мы увеличиваем расстояние на 1 пиксель в ширину (независимо от DPI и размера текста всегда 1 пиксель)
fPenX
+=
1
;
...
...
@@ -1247,7 +1247,7 @@ function CFontFile(fileName, faceIndex)
}
fPenX
+=
charSymbolObj
.
fAdvanceX
+
this
.
m_fCharSpacing
;
if
(
this
.
m_bNeedDoBold
)
if
(
this
.
m_bNeedDoBold
&&
this
.
m_oFontManager
.
IsAdvanceNeedBoldFonts
)
{
// Когда текст делаем жирным сами, то мы увеличиваем расстояние на 1 пиксель в ширину (независимо от DPI и размера текста всегда 1 пиксель)
//fPenX += 1;
...
...
@@ -1413,7 +1413,7 @@ function CFontFile(fileName, faceIndex)
oSizes
.
oBBox
.
fMinY
=
(
yMin
>>
6
);
oSizes
.
oBBox
.
fMaxY
=
(
yMax
>>
6
);
if
(
this
.
m_bNeedDoBold
)
if
(
this
.
m_bNeedDoBold
&&
this
.
m_oFontManager
.
IsAdvanceNeedBoldFonts
oSizes
.
fAdvanceX
+=
1
;
var
dstM
=
oSizes
.
oMetrics
;
...
...
common/FontsFreeType/FontManager.js
View file @
377b84eb
"
use strict
"
;
"
use strict
"
;
var
g_bIsAppleDevices
=
AscBrowser
.
isAppleDevices
;
...
...
@@ -1311,6 +1311,8 @@ function CFontManager()
this
.
LOAD_MODE
=
40970
;
this
.
IsAdvanceNeedBoldFonts
=
true
;
this
.
AfterLoad
=
function
()
{
if
(
null
==
this
.
m_pFont
)
...
...
@@ -1695,4 +1697,9 @@ function CFontManager()
this
.
LOAD_MODE
=
40970
;
}
}
this
.
SetAdvanceNeedBoldFonts
=
function
(
value
)
{
this
.
IsAdvanceNeedBoldFonts
=
value
;
}
}
\ No newline at end of file
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