mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-02-10 18:05:41 +08:00
Add method for decompile font stream to uint8array
This commit is contained in:
@ -68,6 +68,11 @@ AscFonts.CopyStreamToMemory = function(data, size)
|
||||
return fontStreamPointer;
|
||||
};
|
||||
|
||||
AscFonts.GetUint8ArrayFromPointer = function(pointer, size)
|
||||
{
|
||||
return new Uint8Array(Module["HEAP8"].buffer, pointer, size);
|
||||
};
|
||||
|
||||
function CShapeString(size)
|
||||
{
|
||||
this.size = size;
|
||||
|
||||
@ -54,6 +54,11 @@ AscFonts.CopyStreamToMemory = function(data, size)
|
||||
return data;
|
||||
};
|
||||
|
||||
AscFonts.GetUint8ArrayFromPointer = function(pointer, size)
|
||||
{
|
||||
return pointer;
|
||||
};
|
||||
|
||||
function CShapeString(size)
|
||||
{
|
||||
this.size = size;
|
||||
|
||||
@ -41,6 +41,7 @@ function onLoadFontsModule(window, undefined)
|
||||
AscFonts.TT_INTERPRETER_VERSION_40 = 40;
|
||||
|
||||
AscFonts.CopyStreamToMemory = AscFonts["CopyStreamToMemory"];
|
||||
AscFonts.GetUint8ArrayFromPointer = AscFonts["GetUint8ArrayFromPointer"];
|
||||
|
||||
AscFonts.AllocString2 = AscFonts["AllocString"];
|
||||
AscFonts.AllocString = function(size)
|
||||
@ -81,7 +82,6 @@ function onLoadFontsModule(window, undefined)
|
||||
AscFonts.Hyphen_CheckDictionary = AscFonts["Hyphen_CheckDictionary"];
|
||||
AscFonts.Hyphen_Word = AscFonts["Hyphen_Word"];
|
||||
|
||||
|
||||
AscFonts.CreateNativeStreamByIndex = function(stream_index)
|
||||
{
|
||||
let stream = AscFonts.g_fonts_streams[stream_index];
|
||||
|
||||
Reference in New Issue
Block a user