Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
utf8mb4
Commit Description:
utf8mb4
import r from 'restructure' ;
export let BigMetrics = new r . Struct ({
height : r . uint8 ,
width : r . uint8 ,
horiBearingX : r . int8 ,
horiBearingY : r . int8 ,
horiAdvance : r . uint8 ,
vertBearingX : r . int8 ,
vertBearingY : r . int8 ,
vertAdvance : r . uint8
});
export let SmallMetrics = new r . Struct ({
height : r . uint8 ,
width : r . uint8 ,
bearingX : r . int8 ,
bearingY : r . int8 ,
advance : r . uint8
});
let EBDTComponent = new r . Struct ({
glyph : r . uint16 ,
xOffset : r . int8 ,
yOffset : r . int8
});
class ByteAligned {}
class BitAligned {}
export let glyph = new r . VersionedStruct ( 'version' , {
1 : {
metrics : SmallMetrics ,
data : ByteAligned
},
2 : {
metrics : SmallMetrics ,
data : BitAligned
},
// format 3 is deprecated
// format 4 is not supported by Microsoft
5 : {
data : BitAligned
},
6 : {
metrics : BigMetrics ,
data : ByteAligned
},
7 : {
metrics : BigMetrics ,
data : BitAligned
},
8 : {
metrics : SmallMetrics ,
pad : new r . Reserved ( r . uint8 ),
numComponents : r . uint16 ,
components : new r . Array ( EBDTComponent , 'numComponents' )
},
9 : {
metrics : BigMetrics ,
pad : new r . Reserved ( r . uint8 ),
numComponents : r . uint16 ,
components : new r . Array ( EBDTComponent , 'numComponents' )
},
17 : {
metrics : SmallMetrics ,
dataLen : r . uint32 ,
data : new r . Buffer ( 'dataLen' )
},
18 : {
metrics : BigMetrics ,
dataLen : r . uint32 ,
data : new r . Buffer ( 'dataLen' )
},
19 : {
dataLen : r . uint32 ,
data : new r . Buffer ( 'dataLen' )
}
});
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings