Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
31 lines
638 B
Plaintext
31 lines
638 B
Plaintext
/**
|
|
* @file kern
|
|
* @author fr33z00(https://github.com/fr33z00)
|
|
*
|
|
* @reference: https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6kern.html
|
|
*/
|
|
|
|
import table from './table';
|
|
|
|
export default table.create(
|
|
'kern',
|
|
[],
|
|
{
|
|
|
|
read(reader, ttf) {
|
|
const length = ttf.tables.kern.length;
|
|
return reader.readBytes(this.offset, length);
|
|
},
|
|
|
|
write(writer, ttf) {
|
|
if (ttf.kern) {
|
|
writer.writeBytes(ttf.kern, ttf.kern.length);
|
|
}
|
|
},
|
|
|
|
size(ttf) {
|
|
return ttf.kern ? ttf.kern.length : 0;
|
|
}
|
|
}
|
|
);
|