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
1b3a36f3
Commit
1b3a36f3
authored
Jul 04, 2016
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load_Glyph hints error
parent
2550167a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
DesktopEditor/fontengine/FontFile.cpp
DesktopEditor/fontengine/FontFile.cpp
+45
-4
No files found.
DesktopEditor/fontengine/FontFile.cpp
View file @
1b3a36f3
...
...
@@ -43,6 +43,47 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
FT_Error
FT_Load_Glyph_Wrapper
(
FT_Face
face
,
FT_UInt
glyph_index
,
FT_Int32
&
load_flags
,
INT
&
bHintsSupport
)
{
int
nErr
=
FT_Load_Glyph
(
face
,
glyph_index
,
load_flags
);
/*
FT_Err_Invalid_Glyph_Index = 0x10;
FT_Err_Invalid_Character_Code = 0x11;
FT_Err_Invalid_Glyph_Format = 0x12;
FT_Err_Cannot_Render_Glyph = 0x13;
FT_Err_Invalid_Outline = 0x14;
FT_Err_Invalid_Composite = 0x15;
FT_Err_Too_Many_Hints = 0x16;
FT_Err_Invalid_Pixel_Size = 0x17;
FT_Err_Invalid_Handle = 0x20;
FT_Err_Invalid_Library_Handle = 0x21;
FT_Err_Invalid_Driver_Handle = 0x22;
FT_Err_Invalid_Face_Handle = 0x23;
FT_Err_Invalid_Size_Handle = 0x24;
FT_Err_Invalid_Slot_Handle = 0x25;
FT_Err_Invalid_CharMap_Handle = 0x26;
FT_Err_Invalid_Cache_Handle = 0x27;
FT_Err_Invalid_Stream_Handle = 0x28;
*/
if
((
bHintsSupport
==
TRUE
)
&&
(
nErr
<
0x10
||
nErr
>
0x28
))
{
int
nErr2
=
FT_Load_Glyph
(
face
,
glyph_index
,
40970
);
if
(
0
==
nErr2
)
{
bHintsSupport
=
FALSE
;
load_flags
=
40970
;
nErr
=
0
;
}
}
return
nErr
;
}
CFontFile
::
CFontFile
()
{
m_pStream
=
NULL
;
...
...
@@ -815,7 +856,7 @@ TFontCacheSizes CFontFile::GetChar(LONG lUnicode)
oSizes
.
nCMapIndex
=
nCMapIndex
;
FT_Int32
_LOAD_MODE
=
m_bHintsSupport
?
m_pFontManager
->
m_nLOAD_MODE
:
40970
;
if
(
0
!=
FT_Load_Glyph
(
pFace
,
unGID
,
_LOAD_MODE
))
if
(
0
!=
FT_Load_Glyph
_Wrapper
(
pFace
,
unGID
,
_LOAD_MODE
,
m_bHintsSupport
))
return
oSizes
;
FT_Glyph
pGlyph
=
NULL
;
...
...
@@ -960,7 +1001,7 @@ INT CFontFile::GetString(CGlyphString& oString)
}
FT_Int32
_LOAD_MODE
=
m_bHintsSupport
?
m_pFontManager
->
m_nLOAD_MODE
:
40970
;
if
(
0
!=
FT_Load_Glyph
(
pFace
,
unGID
,
_LOAD_MODE
))
if
(
0
!=
FT_Load_Glyph
_Wrapper
(
pFace
,
unGID
,
_LOAD_MODE
,
m_bHintsSupport
))
return
FALSE
;
FT_Glyph
pGlyph
=
NULL
;
...
...
@@ -1178,7 +1219,7 @@ INT CFontFile::GetString2(CGlyphString& oString)
}
FT_Int32
_LOAD_MODE
=
m_bHintsSupport
?
m_pFontManager
->
m_nLOAD_MODE
:
40970
;
if
(
0
!=
FT_Load_Glyph
(
pFace
,
unGID
,
_LOAD_MODE
))
if
(
0
!=
FT_Load_Glyph
_Wrapper
(
pFace
,
unGID
,
_LOAD_MODE
,
m_bHintsSupport
))
return
FALSE
;
FT_Glyph
pGlyph
=
NULL
;
...
...
@@ -1458,7 +1499,7 @@ INT CFontFile::GetString2C(CGlyphString& oString)
}
FT_Int32
_LOAD_MODE
=
m_bHintsSupport
?
m_pFontManager
->
m_nLOAD_MODE
:
40970
;
if
(
0
!=
FT_Load_Glyph
(
pFace
,
unGID
,
_LOAD_MODE
))
if
(
0
!=
FT_Load_Glyph
_Wrapper
(
pFace
,
unGID
,
_LOAD_MODE
,
m_bHintsSupport
))
return
FALSE
;
FT_Glyph
pGlyph
=
NULL
;
...
...
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