зеркало из https://github.com/mozilla/gecko-dev.git
219 строки
11 KiB
JavaScript
219 строки
11 KiB
JavaScript
// Hex dump of the markA font data:
|
|
const markA_data = [
|
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x80,
|
|
0x00, 0x03, 0x00, 0x50, 0x46, 0x46, 0x54, 0x4D,
|
|
0x4E, 0xAE, 0xE8, 0xC9, 0x00, 0x00, 0x05, 0xDC,
|
|
0x00, 0x00, 0x00, 0x1C, 0x4F, 0x53, 0x2F, 0x32,
|
|
0x56, 0x61, 0x64, 0x0A, 0x00, 0x00, 0x01, 0x58,
|
|
0x00, 0x00, 0x00, 0x56, 0x63, 0x6D, 0x61, 0x70,
|
|
0x00, 0x0F, 0x03, 0xEF, 0x00, 0x00, 0x01, 0xC0,
|
|
0x00, 0x00, 0x01, 0x42, 0x63, 0x76, 0x74, 0x20,
|
|
0x00, 0x21, 0x02, 0x79, 0x00, 0x00, 0x03, 0x04,
|
|
0x00, 0x00, 0x00, 0x04, 0x67, 0x61, 0x73, 0x70,
|
|
0xFF, 0xFF, 0x00, 0x03, 0x00, 0x00, 0x05, 0xD4,
|
|
0x00, 0x00, 0x00, 0x08, 0x67, 0x6C, 0x79, 0x66,
|
|
0x08, 0x2E, 0x9A, 0x4F, 0x00, 0x00, 0x03, 0x14,
|
|
0x00, 0x00, 0x00, 0x8C, 0x68, 0x65, 0x61, 0x64,
|
|
0xEF, 0x28, 0xA0, 0x17, 0x00, 0x00, 0x00, 0xDC,
|
|
0x00, 0x00, 0x00, 0x36, 0x68, 0x68, 0x65, 0x61,
|
|
0x08, 0x90, 0x05, 0x7D, 0x00, 0x00, 0x01, 0x14,
|
|
0x00, 0x00, 0x00, 0x24, 0x68, 0x6D, 0x74, 0x78,
|
|
0x11, 0x94, 0x00, 0x85, 0x00, 0x00, 0x01, 0xB0,
|
|
0x00, 0x00, 0x00, 0x10, 0x6C, 0x6F, 0x63, 0x61,
|
|
0x00, 0x70, 0x00, 0x54, 0x00, 0x00, 0x03, 0x08,
|
|
0x00, 0x00, 0x00, 0x0A, 0x6D, 0x61, 0x78, 0x70,
|
|
0x00, 0x49, 0x00, 0x3D, 0x00, 0x00, 0x01, 0x38,
|
|
0x00, 0x00, 0x00, 0x20, 0x6E, 0x61, 0x6D, 0x65,
|
|
0x7A, 0x10, 0x15, 0x3A, 0x00, 0x00, 0x03, 0xA0,
|
|
0x00, 0x00, 0x02, 0x07, 0x70, 0x6F, 0x73, 0x74,
|
|
0xFF, 0xAE, 0x00, 0x35, 0x00, 0x00, 0x05, 0xA8,
|
|
0x00, 0x00, 0x00, 0x2A, 0x00, 0x01, 0x00, 0x00,
|
|
0x00, 0x01, 0x00, 0x00, 0x32, 0x13, 0xF2, 0xB9,
|
|
0x5F, 0x0F, 0x3C, 0xF5, 0x00, 0x0B, 0x03, 0xE8,
|
|
0x00, 0x00, 0x00, 0x00, 0xC5, 0x38, 0x2E, 0x6D,
|
|
0x00, 0x00, 0x00, 0x00, 0xC5, 0x38, 0x2E, 0x6D,
|
|
0x00, 0x21, 0xFF, 0x9C, 0x05, 0x78, 0x02, 0xBC,
|
|
0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
|
0x02, 0xBC, 0xFF, 0x9C, 0x00, 0x5A, 0x05, 0xDC,
|
|
0x00, 0x00, 0x00, 0x00, 0x05, 0x78, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
|
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0C,
|
|
0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
|
|
0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
|
|
0x00, 0x40, 0x00, 0x2E, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x01, 0x05, 0xDC, 0x01, 0xF4, 0x00, 0x05,
|
|
0x00, 0x00, 0x02, 0x8A, 0x02, 0xBC, 0x00, 0x00,
|
|
0x00, 0x8C, 0x02, 0x8A, 0x02, 0xBC, 0x00, 0x00,
|
|
0x01, 0xE0, 0x00, 0x31, 0x01, 0x02, 0x00, 0x00,
|
|
0x02, 0x00, 0x06, 0x09, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x50, 0x66, 0x45, 0x64, 0x00, 0x40,
|
|
0x00, 0x41, 0x00, 0x41, 0x03, 0x20, 0xFF, 0x38,
|
|
0x00, 0x5A, 0x02, 0xBC, 0x00, 0x64, 0x00, 0x00,
|
|
0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x05, 0xDC, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00,
|
|
0x05, 0xDC, 0x00, 0x00, 0x05, 0xDC, 0x00, 0x64,
|
|
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03,
|
|
0x00, 0x00, 0x00, 0x1C, 0x00, 0x01, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x3C, 0x00, 0x03, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x00, 0x20,
|
|
0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x41, 0xFF, 0xFF, 0x00, 0x00,
|
|
0x00, 0x41, 0xFF, 0xFF, 0xFF, 0xC2, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06,
|
|
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x02, 0x79,
|
|
0x00, 0x00, 0x00, 0x2A, 0x00, 0x2A, 0x00, 0x2A,
|
|
0x00, 0x46, 0x00, 0x00, 0x00, 0x02, 0x00, 0x21,
|
|
0x00, 0x00, 0x01, 0x2A, 0x02, 0x9A, 0x00, 0x03,
|
|
0x00, 0x07, 0x00, 0x2E, 0xB1, 0x01, 0x00, 0x2F,
|
|
0x3C, 0xB2, 0x07, 0x04, 0x00, 0xED, 0x32, 0xB1,
|
|
0x06, 0x05, 0xDC, 0x3C, 0xB2, 0x03, 0x02, 0x00,
|
|
0xED, 0x32, 0x00, 0xB1, 0x03, 0x00, 0x2F, 0x3C,
|
|
0xB2, 0x05, 0x04, 0x00, 0xED, 0x32, 0xB2, 0x07,
|
|
0x06, 0x01, 0xFC, 0x3C, 0xB2, 0x01, 0x02, 0x00,
|
|
0xED, 0x32, 0x33, 0x11, 0x21, 0x11, 0x27, 0x33,
|
|
0x11, 0x23, 0x21, 0x01, 0x09, 0xE8, 0xC7, 0xC7,
|
|
0x02, 0x9A, 0xFD, 0x66, 0x21, 0x02, 0x58, 0x00,
|
|
0x00, 0x03, 0x00, 0x64, 0xFF, 0x9C, 0x05, 0x78,
|
|
0x02, 0xBC, 0x00, 0x03, 0x00, 0x07, 0x00, 0x0B,
|
|
0x00, 0x00, 0x01, 0x35, 0x21, 0x15, 0x01, 0x35,
|
|
0x21, 0x15, 0x01, 0x35, 0x21, 0x15, 0x01, 0xF4,
|
|
0x01, 0xF4, 0xFD, 0x44, 0x03, 0x84, 0xFB, 0xB4,
|
|
0x05, 0x14, 0x01, 0xF4, 0xC8, 0xC8, 0xFE, 0xD4,
|
|
0xC8, 0xC8, 0xFE, 0xD4, 0xC8, 0xC8, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x0E, 0x00, 0xAE, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26,
|
|
0x00, 0x4E, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x01, 0x00, 0x05, 0x00, 0x81, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06,
|
|
0x00, 0x95, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x03, 0x00, 0x21, 0x00, 0xE0, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05,
|
|
0x01, 0x0E, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x05, 0x00, 0x10, 0x01, 0x36, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05,
|
|
0x01, 0x53, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09,
|
|
0x00, 0x00, 0x00, 0x4C, 0x00, 0x00, 0x00, 0x03,
|
|
0x00, 0x01, 0x04, 0x09, 0x00, 0x01, 0x00, 0x0A,
|
|
0x00, 0x75, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09,
|
|
0x00, 0x02, 0x00, 0x0C, 0x00, 0x87, 0x00, 0x03,
|
|
0x00, 0x01, 0x04, 0x09, 0x00, 0x03, 0x00, 0x42,
|
|
0x00, 0x9C, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09,
|
|
0x00, 0x04, 0x00, 0x0A, 0x01, 0x02, 0x00, 0x03,
|
|
0x00, 0x01, 0x04, 0x09, 0x00, 0x05, 0x00, 0x20,
|
|
0x01, 0x14, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09,
|
|
0x00, 0x06, 0x00, 0x0A, 0x01, 0x47, 0x00, 0x43,
|
|
0x00, 0x6F, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72,
|
|
0x00, 0x69, 0x00, 0x67, 0x00, 0x68, 0x00, 0x74,
|
|
0x00, 0x20, 0x00, 0x28, 0x00, 0x63, 0x00, 0x29,
|
|
0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x30,
|
|
0x00, 0x38, 0x00, 0x20, 0x00, 0x4D, 0x00, 0x6F,
|
|
0x00, 0x7A, 0x00, 0x69, 0x00, 0x6C, 0x00, 0x6C,
|
|
0x00, 0x61, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6F,
|
|
0x00, 0x72, 0x00, 0x70, 0x00, 0x6F, 0x00, 0x72,
|
|
0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6F,
|
|
0x00, 0x6E, 0x00, 0x00, 0x43, 0x6F, 0x70, 0x79,
|
|
0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x28, 0x63,
|
|
0x29, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x4D,
|
|
0x6F, 0x7A, 0x69, 0x6C, 0x6C, 0x61, 0x20, 0x43,
|
|
0x6F, 0x72, 0x70, 0x6F, 0x72, 0x61, 0x74, 0x69,
|
|
0x6F, 0x6E, 0x00, 0x00, 0x4D, 0x00, 0x61, 0x00,
|
|
0x72, 0x00, 0x6B, 0x00, 0x41, 0x00, 0x00, 0x4D,
|
|
0x61, 0x72, 0x6B, 0x41, 0x00, 0x00, 0x4D, 0x00,
|
|
0x65, 0x00, 0x64, 0x00, 0x69, 0x00, 0x75, 0x00,
|
|
0x6D, 0x00, 0x00, 0x4D, 0x65, 0x64, 0x69, 0x75,
|
|
0x6D, 0x00, 0x00, 0x46, 0x00, 0x6F, 0x00, 0x6E,
|
|
0x00, 0x74, 0x00, 0x46, 0x00, 0x6F, 0x00, 0x72,
|
|
0x00, 0x67, 0x00, 0x65, 0x00, 0x20, 0x00, 0x32,
|
|
0x00, 0x2E, 0x00, 0x30, 0x00, 0x20, 0x00, 0x3A,
|
|
0x00, 0x20, 0x00, 0x4D, 0x00, 0x61, 0x00, 0x72,
|
|
0x00, 0x6B, 0x00, 0x41, 0x00, 0x20, 0x00, 0x3A,
|
|
0x00, 0x20, 0x00, 0x35, 0x00, 0x2D, 0x00, 0x31,
|
|
0x00, 0x31, 0x00, 0x2D, 0x00, 0x32, 0x00, 0x30,
|
|
0x00, 0x30, 0x00, 0x38, 0x00, 0x00, 0x46, 0x6F,
|
|
0x6E, 0x74, 0x46, 0x6F, 0x72, 0x67, 0x65, 0x20,
|
|
0x32, 0x2E, 0x30, 0x20, 0x3A, 0x20, 0x4D, 0x61,
|
|
0x72, 0x6B, 0x41, 0x20, 0x3A, 0x20, 0x35, 0x2D,
|
|
0x31, 0x31, 0x2D, 0x32, 0x30, 0x30, 0x38, 0x00,
|
|
0x00, 0x4D, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6B,
|
|
0x00, 0x41, 0x00, 0x00, 0x4D, 0x61, 0x72, 0x6B,
|
|
0x41, 0x00, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72,
|
|
0x00, 0x73, 0x00, 0x69, 0x00, 0x6F, 0x00, 0x6E,
|
|
0x00, 0x20, 0x00, 0x30, 0x00, 0x30, 0x00, 0x31,
|
|
0x00, 0x2E, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30,
|
|
0x00, 0x20, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73,
|
|
0x69, 0x6F, 0x6E, 0x20, 0x30, 0x30, 0x31, 0x2E,
|
|
0x30, 0x30, 0x30, 0x20, 0x00, 0x00, 0x4D, 0x00,
|
|
0x61, 0x00, 0x72, 0x00, 0x6B, 0x00, 0x41, 0x00,
|
|
0x00, 0x4D, 0x61, 0x72, 0x6B, 0x41, 0x00, 0x00,
|
|
0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0xFF, 0x83, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02,
|
|
0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
0xFF, 0xFF, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01,
|
|
0x00, 0x00, 0x00, 0x00, 0xC4, 0x3E, 0x8B, 0xEE,
|
|
0x00, 0x00, 0x00, 0x00, 0xC5, 0x38, 0x2E, 0x6D,
|
|
0x00, 0x00, 0x00, 0x00, 0xC5, 0x38, 0x2E, 0x6D
|
|
];
|
|
|
|
const BinaryOutputStream =
|
|
Components.Constructor("@mozilla.org/binaryoutputstream;1",
|
|
"nsIBinaryOutputStream", "setOutputStream");
|
|
|
|
var timer;
|
|
function handleRequest(request, response) {
|
|
response.setStatusLine(request.httpVersion, 200, "OK");
|
|
response.setHeader("Content-Type", "font/opentype", false);
|
|
response.processAsync();
|
|
|
|
function fontWrite(data) {
|
|
var stream = new BinaryOutputStream(response.bodyOutputStream);
|
|
stream.writeByteArray(data);
|
|
}
|
|
|
|
const nsITimer = Components.interfaces.nsITimer;
|
|
|
|
timer = Components.classes["@mozilla.org/timer;1"].createInstance(nsITimer);
|
|
timer.initWithCallback(function() {
|
|
fontWrite(markA_data);
|
|
response.finish();
|
|
}, 100, nsITimer.TYPE_ONE_SHOT);
|
|
}
|