rhwp 0.9.1

HWP/HWPX document engine for Rust applications, WebAssembly, and CLI automation
Documentation
//! 공개 Latin Modern Math의 MATH 늘림 중괄호 데이터.
//! Copyright 2012--2014 B. Jackowski, P. Strzelczyk, P. Pianowski.
//! GUST Font License: assets/fonts/LatinModernMath-GUST-FONT-LICENSE.txt.
//! 원본 SHA-256: 1177d9025d1e797c54b3c7676976365abd90f903423091de7f0f4e7a4b372162.
//! fontTools RecordingPen으로 추출. 사설 글꼴 윤곽은 포함하지 않는다.

use super::{Glyph, Part};
use crate::renderer::equation::GlyphOutlineCommand as Command;

const OUTLINE_0: &[Command] = &[
    Command::Move((425.0, -238.0)),
    Command::Cubic([(425.0, -231.0), (420.0, -226.0), (413.0, -226.0)]),
    Command::Cubic([(338.0, -226.0), (283.0, -177.0), (283.0, -125.0)]),
    Command::Line((283.0, 125.0)),
    Command::Cubic([(283.0, 183.0), (235.0, 229.0), (168.0, 250.0)]),
    Command::Cubic([(235.0, 271.0), (283.0, 317.0), (283.0, 375.0)]),
    Command::Line((283.0, 625.0)),
    Command::Cubic([(283.0, 677.0), (338.0, 726.0), (413.0, 726.0)]),
    Command::Cubic([(420.0, 726.0), (425.0, 731.0), (425.0, 738.0)]),
    Command::Cubic([(425.0, 745.0), (420.0, 750.0), (413.0, 750.0)]),
    Command::Cubic([(308.0, 750.0), (217.0, 698.0), (217.0, 625.0)]),
    Command::Line((217.0, 375.0)),
    Command::Cubic([(217.0, 317.0), (162.0, 262.0), (87.0, 262.0)]),
    Command::Cubic([(80.0, 262.0), (75.0, 257.0), (75.0, 250.0)]),
    Command::Cubic([(75.0, 243.0), (80.0, 238.0), (87.0, 238.0)]),
    Command::Cubic([(162.0, 238.0), (217.0, 183.0), (217.0, 125.0)]),
    Command::Line((217.0, -125.0)),
    Command::Cubic([(217.0, -198.0), (308.0, -250.0), (413.0, -250.0)]),
    Command::Cubic([(420.0, -250.0), (425.0, -245.0), (425.0, -238.0)]),
    Command::Close,
];
const GLYPH_0: Glyph = Glyph {
    advance: 500.0,
    min_y: -250.0,
    max_y: 750.0,
    outline: OUTLINE_0,
};
const OUTLINE_1: &[Command] = &[
    Command::Move((454.0, -287.0)),
    Command::Cubic([(454.0, -280.0), (449.0, -274.0), (442.0, -274.0)]),
    Command::Cubic([(363.0, -270.0), (304.0, -216.0), (304.0, -163.0)]),
    Command::Line((304.0, 113.0)),
    Command::Cubic([(304.0, 176.0), (249.0, 227.0), (174.0, 250.0)]),
    Command::Cubic([(249.0, 273.0), (304.0, 324.0), (304.0, 387.0)]),
    Command::Line((304.0, 663.0)),
    Command::Cubic([(304.0, 716.0), (363.0, 770.0), (442.0, 774.0)]),
    Command::Cubic([(449.0, 774.0), (454.0, 780.0), (454.0, 787.0)]),
    Command::Cubic([(454.0, 794.0), (448.0, 800.0), (440.0, 800.0)]),
    Command::Cubic([(330.0, 794.0), (236.0, 737.0), (236.0, 663.0)]),
    Command::Line((236.0, 387.0)),
    Command::Cubic([(236.0, 327.0), (178.0, 267.0), (98.0, 263.0)]),
    Command::Cubic([(91.0, 263.0), (86.0, 257.0), (86.0, 250.0)]),
    Command::Cubic([(86.0, 243.0), (91.0, 237.0), (98.0, 237.0)]),
    Command::Cubic([(178.0, 233.0), (236.0, 173.0), (236.0, 113.0)]),
    Command::Line((236.0, -163.0)),
    Command::Cubic([(236.0, -237.0), (330.0, -294.0), (440.0, -300.0)]),
    Command::Cubic([(448.0, -300.0), (454.0, -294.0), (454.0, -287.0)]),
    Command::Close,
];
const GLYPH_1: Glyph = Glyph {
    advance: 540.0,
    min_y: -300.0,
    max_y: 800.0,
    outline: OUTLINE_1,
};
const OUTLINE_2: &[Command] = &[
    Command::Move((486.0, -336.0)),
    Command::Cubic([(486.0, -329.0), (480.0, -323.0), (473.0, -322.0)]),
    Command::Cubic([(389.0, -314.0), (327.0, -255.0), (327.0, -200.0)]),
    Command::Line((327.0, 100.0)),
    Command::Cubic([(327.0, 167.0), (264.0, 224.0), (181.0, 250.0)]),
    Command::Cubic([(264.0, 276.0), (327.0, 333.0), (327.0, 400.0)]),
    Command::Line((327.0, 700.0)),
    Command::Cubic([(327.0, 755.0), (389.0, 814.0), (473.0, 822.0)]),
    Command::Cubic([(480.0, 823.0), (486.0, 829.0), (486.0, 836.0)]),
    Command::Cubic([(486.0, 844.0), (480.0, 850.0), (472.0, 850.0)]),
    Command::Line((471.0, 850.0)),
    Command::Cubic([(356.0, 838.0), (257.0, 775.0), (257.0, 700.0)]),
    Command::Line((257.0, 400.0)),
    Command::Cubic([(257.0, 338.0), (195.0, 272.0), (111.0, 264.0)]),
    Command::Cubic([(104.0, 263.0), (98.0, 257.0), (98.0, 250.0)]),
    Command::Cubic([(98.0, 243.0), (104.0, 237.0), (111.0, 236.0)]),
    Command::Cubic([(195.0, 228.0), (257.0, 162.0), (257.0, 100.0)]),
    Command::Line((257.0, -200.0)),
    Command::Cubic([(257.0, -275.0), (356.0, -338.0), (471.0, -350.0)]),
    Command::Line((472.0, -350.0)),
    Command::Cubic([(480.0, -350.0), (486.0, -344.0), (486.0, -336.0)]),
    Command::Close,
];
const GLYPH_2: Glyph = Glyph {
    advance: 583.0,
    min_y: -350.0,
    max_y: 850.0,
    outline: OUTLINE_2,
};
const OUTLINE_3: &[Command] = &[
    Command::Move((524.0, -459.0)),
    Command::Cubic([(524.0, -451.0), (518.0, -444.0), (510.0, -443.0)]),
    Command::Cubic([(418.0, -429.0), (350.0, -357.0), (350.0, -293.0)]),
    Command::Line((350.0, 68.0)),
    Command::Cubic([(350.0, 147.0), (277.0, 217.0), (182.0, 250.0)]),
    Command::Cubic([(277.0, 283.0), (350.0, 353.0), (350.0, 432.0)]),
    Command::Line((350.0, 793.0)),
    Command::Cubic([(350.0, 857.0), (418.0, 929.0), (510.0, 943.0)]),
    Command::Cubic([(518.0, 944.0), (524.0, 951.0), (524.0, 959.0)]),
    Command::Cubic([(524.0, 968.0), (517.0, 975.0), (508.0, 975.0)]),
    Command::Line((506.0, 975.0)),
    Command::Cubic([(382.0, 956.0), (274.0, 879.0), (274.0, 793.0)]),
    Command::Line((274.0, 432.0)),
    Command::Cubic([(274.0, 359.0), (207.0, 280.0), (114.0, 266.0)]),
    Command::Cubic([(106.0, 265.0), (100.0, 258.0), (100.0, 250.0)]),
    Command::Cubic([(100.0, 242.0), (106.0, 235.0), (114.0, 234.0)]),
    Command::Cubic([(207.0, 220.0), (274.0, 141.0), (274.0, 68.0)]),
    Command::Line((274.0, -293.0)),
    Command::Cubic([(274.0, -379.0), (382.0, -456.0), (506.0, -475.0)]),
    Command::Line((508.0, -475.0)),
    Command::Cubic([(517.0, -475.0), (524.0, -468.0), (524.0, -459.0)]),
    Command::Close,
];
const GLYPH_3: Glyph = Glyph {
    advance: 624.0,
    min_y: -475.0,
    max_y: 975.0,
    outline: OUTLINE_3,
};
const OUTLINE_4: &[Command] = &[
    Command::Move((569.0, -632.0)),
    Command::Cubic([(569.0, -623.0), (563.0, -616.0), (555.0, -614.0)]),
    Command::Cubic([(450.0, -593.0), (375.0, -503.0), (375.0, -425.0)]),
    Command::Line((375.0, 25.0)),
    Command::Cubic([(375.0, 120.0), (288.0, 209.0), (179.0, 250.0)]),
    Command::Cubic([(288.0, 291.0), (375.0, 380.0), (375.0, 475.0)]),
    Command::Line((375.0, 925.0)),
    Command::Cubic([(375.0, 1003.0), (450.0, 1093.0), (555.0, 1114.0)]),
    Command::Cubic([(563.0, 1116.0), (569.0, 1123.0), (569.0, 1132.0)]),
    Command::Cubic([(569.0, 1142.0), (561.0, 1150.0), (551.0, 1150.0)]),
    Command::Line((547.0, 1150.0)),
    Command::Cubic([(411.0, 1122.0), (291.0, 1027.0), (291.0, 925.0)]),
    Command::Line((291.0, 475.0)),
    Command::Cubic([(291.0, 388.0), (217.0, 289.0), (111.0, 268.0)]),
    Command::Cubic([(103.0, 266.0), (97.0, 259.0), (97.0, 250.0)]),
    Command::Cubic([(97.0, 241.0), (103.0, 234.0), (111.0, 232.0)]),
    Command::Cubic([(217.0, 211.0), (291.0, 112.0), (291.0, 25.0)]),
    Command::Line((291.0, -425.0)),
    Command::Cubic([(291.0, -527.0), (411.0, -622.0), (547.0, -650.0)]),
    Command::Line((551.0, -650.0)),
    Command::Cubic([(561.0, -650.0), (569.0, -642.0), (569.0, -632.0)]),
    Command::Close,
];
const GLYPH_4: Glyph = Glyph {
    advance: 667.0,
    min_y: -650.0,
    max_y: 1150.0,
    outline: OUTLINE_4,
};
const OUTLINE_5: &[Command] = &[
    Command::Move((608.0, -780.0)),
    Command::Cubic([(608.0, -771.0), (602.0, -763.0), (593.0, -761.0)]),
    Command::Cubic([(479.0, -732.0), (398.0, -627.0), (398.0, -538.0)]),
    Command::Line((398.0, -12.0)),
    Command::Cubic([(398.0, 96.0), (302.0, 200.0), (183.0, 250.0)]),
    Command::Cubic([(302.0, 300.0), (398.0, 404.0), (398.0, 512.0)]),
    Command::Line((398.0, 1038.0)),
    Command::Cubic([(398.0, 1127.0), (479.0, 1232.0), (593.0, 1261.0)]),
    Command::Cubic([(602.0, 1263.0), (608.0, 1271.0), (608.0, 1280.0)]),
    Command::Cubic([(608.0, 1291.0), (599.0, 1300.0), (588.0, 1300.0)]),
    Command::Cubic([(586.0, 1300.0), (585.0, 1300.0), (583.0, 1299.0)]),
    Command::Cubic([(438.0, 1262.0), (310.0, 1151.0), (310.0, 1038.0)]),
    Command::Line((310.0, 512.0)),
    Command::Cubic([(310.0, 413.0), (229.0, 299.0), (115.0, 269.0)]),
    Command::Cubic([(106.0, 267.0), (100.0, 259.0), (100.0, 250.0)]),
    Command::Cubic([(100.0, 241.0), (106.0, 233.0), (115.0, 231.0)]),
    Command::Cubic([(229.0, 201.0), (310.0, 87.0), (310.0, -12.0)]),
    Command::Line((310.0, -538.0)),
    Command::Cubic([(310.0, -651.0), (438.0, -762.0), (583.0, -799.0)]),
    Command::Cubic([(585.0, -800.0), (586.0, -800.0), (588.0, -800.0)]),
    Command::Cubic([(599.0, -800.0), (608.0, -791.0), (608.0, -780.0)]),
    Command::Close,
];
const GLYPH_5: Glyph = Glyph {
    advance: 707.0,
    min_y: -800.0,
    max_y: 1300.0,
    outline: OUTLINE_5,
};
const OUTLINE_6: &[Command] = &[
    Command::Move((648.0, -928.0)),
    Command::Cubic([(648.0, -918.0), (641.0, -910.0), (632.0, -907.0)]),
    Command::Cubic([(510.0, -869.0), (422.0, -748.0), (422.0, -650.0)]),
    Command::Line((422.0, -50.0)),
    Command::Cubic([(422.0, 70.0), (315.0, 190.0), (185.0, 250.0)]),
    Command::Cubic([(315.0, 310.0), (422.0, 430.0), (422.0, 550.0)]),
    Command::Line((422.0, 1150.0)),
    Command::Cubic([(422.0, 1248.0), (510.0, 1369.0), (632.0, 1407.0)]),
    Command::Cubic([(641.0, 1410.0), (648.0, 1418.0), (648.0, 1428.0)]),
    Command::Cubic([(648.0, 1440.0), (638.0, 1450.0), (626.0, 1450.0)]),
    Command::Cubic([(624.0, 1450.0), (622.0, 1450.0), (620.0, 1449.0)]),
    Command::Cubic([(465.0, 1401.0), (328.0, 1273.0), (328.0, 1150.0)]),
    Command::Line((328.0, 550.0)),
    Command::Cubic([(328.0, 440.0), (241.0, 309.0), (118.0, 271.0)]),
    Command::Cubic([(109.0, 268.0), (102.0, 260.0), (102.0, 250.0)]),
    Command::Cubic([(102.0, 240.0), (109.0, 232.0), (118.0, 229.0)]),
    Command::Cubic([(241.0, 191.0), (328.0, 60.0), (328.0, -50.0)]),
    Command::Line((328.0, -650.0)),
    Command::Cubic([(328.0, -773.0), (465.0, -901.0), (620.0, -949.0)]),
    Command::Cubic([(622.0, -950.0), (624.0, -950.0), (626.0, -950.0)]),
    Command::Cubic([(638.0, -950.0), (648.0, -940.0), (648.0, -928.0)]),
    Command::Close,
];
const GLYPH_6: Glyph = Glyph {
    advance: 750.0,
    min_y: -950.0,
    max_y: 1450.0,
    outline: OUTLINE_6,
};
const OUTLINE_7: &[Command] = &[
    Command::Move((755.0, -1224.0)),
    Command::Cubic([(755.0, -1213.0), (748.0, -1203.0), (738.0, -1200.0)]),
    Command::Cubic([(600.0, -1149.0), (502.0, -998.0), (502.0, -875.0)]),
    Command::Line((502.0, -125.0)),
    Command::Cubic([(502.0, 22.0), (382.0, 175.0), (237.0, 250.0)]),
    Command::Cubic([(382.0, 325.0), (502.0, 478.0), (502.0, 625.0)]),
    Command::Line((502.0, 1375.0)),
    Command::Cubic([(502.0, 1498.0), (600.0, 1649.0), (738.0, 1700.0)]),
    Command::Cubic([(748.0, 1703.0), (755.0, 1713.0), (755.0, 1724.0)]),
    Command::Cubic([(755.0, 1738.0), (743.0, 1750.0), (729.0, 1750.0)]),
    Command::Cubic([(726.0, 1750.0), (723.0, 1749.0), (720.0, 1748.0)]),
    Command::Cubic([(551.0, 1687.0), (400.0, 1526.0), (400.0, 1375.0)]),
    Command::Line((400.0, 625.0)),
    Command::Cubic([(400.0, 488.0), (303.0, 325.0), (164.0, 274.0)]),
    Command::Cubic([(154.0, 271.0), (147.0, 261.0), (147.0, 250.0)]),
    Command::Cubic([(147.0, 239.0), (154.0, 229.0), (164.0, 226.0)]),
    Command::Cubic([(303.0, 175.0), (400.0, 12.0), (400.0, -125.0)]),
    Command::Line((400.0, -875.0)),
    Command::Cubic([(400.0, -1026.0), (551.0, -1187.0), (720.0, -1248.0)]),
    Command::Cubic([(723.0, -1249.0), (726.0, -1250.0), (729.0, -1250.0)]),
    Command::Cubic([(743.0, -1250.0), (755.0, -1238.0), (755.0, -1224.0)]),
    Command::Close,
];
const GLYPH_7: Glyph = Glyph {
    advance: 902.0,
    min_y: -1250.0,
    max_y: 1750.0,
    outline: OUTLINE_7,
};
const OUTLINE_8: &[Command] = &[
    Command::Move((755.0, 26.0)),
    Command::Cubic([(755.0, 37.0), (748.0, 47.0), (738.0, 50.0)]),
    Command::Cubic([(600.0, 101.0), (502.0, 252.0), (502.0, 375.0)]),
    Command::Line((502.0, 750.0)),
    Command::Line((400.0, 750.0)),
    Command::Line((400.0, 375.0)),
    Command::Cubic([(400.0, 224.0), (551.0, 63.0), (720.0, 2.0)]),
    Command::Cubic([(723.0, 1.0), (726.0, 0.0), (729.0, 0.0)]),
    Command::Cubic([(743.0, 0.0), (755.0, 12.0), (755.0, 26.0)]),
    Command::Close,
];
const GLYPH_8: Glyph = Glyph {
    advance: 902.0,
    min_y: 0.0,
    max_y: 750.0,
    outline: OUTLINE_8,
};
const OUTLINE_9: &[Command] = &[
    Command::Move((502.0, 0.0)),
    Command::Line((502.0, 748.0)),
    Command::Line((400.0, 748.0)),
    Command::Line((400.0, 0.0)),
    Command::Close,
];
const GLYPH_9: Glyph = Glyph {
    advance: 902.0,
    min_y: 0.0,
    max_y: 748.0,
    outline: OUTLINE_9,
};
const OUTLINE_10: &[Command] = &[
    Command::Move((502.0, 1500.0)),
    Command::Line((400.0, 1500.0)),
    Command::Line((400.0, 1125.0)),
    Command::Cubic([(400.0, 988.0), (303.0, 825.0), (164.0, 774.0)]),
    Command::Cubic([(154.0, 771.0), (147.0, 761.0), (147.0, 750.0)]),
    Command::Cubic([(147.0, 739.0), (154.0, 729.0), (164.0, 726.0)]),
    Command::Cubic([(303.0, 675.0), (400.0, 512.0), (400.0, 375.0)]),
    Command::Line((400.0, 0.0)),
    Command::Line((502.0, 0.0)),
    Command::Line((502.0, 375.0)),
    Command::Cubic([(502.0, 522.0), (382.0, 675.0), (237.0, 750.0)]),
    Command::Cubic([(382.0, 825.0), (502.0, 978.0), (502.0, 1125.0)]),
    Command::Close,
];
const GLYPH_10: Glyph = Glyph {
    advance: 902.0,
    min_y: 0.0,
    max_y: 1500.0,
    outline: OUTLINE_10,
};
const OUTLINE_11: &[Command] = &[
    Command::Move((755.0, 724.0)),
    Command::Cubic([(755.0, 738.0), (743.0, 750.0), (729.0, 750.0)]),
    Command::Cubic([(726.0, 750.0), (723.0, 749.0), (720.0, 748.0)]),
    Command::Cubic([(551.0, 687.0), (400.0, 526.0), (400.0, 375.0)]),
    Command::Line((400.0, 0.0)),
    Command::Line((502.0, 0.0)),
    Command::Line((502.0, 375.0)),
    Command::Cubic([(502.0, 498.0), (600.0, 649.0), (738.0, 700.0)]),
    Command::Cubic([(748.0, 703.0), (755.0, 713.0), (755.0, 724.0)]),
    Command::Close,
];
const GLYPH_11: Glyph = Glyph {
    advance: 902.0,
    min_y: 0.0,
    max_y: 750.0,
    outline: OUTLINE_11,
};

pub(super) const VARIANTS: &[(f64, Glyph)] = &[
    (1001.0, GLYPH_0),
    (1101.0, GLYPH_1),
    (1201.0, GLYPH_2),
    (1451.0, GLYPH_3),
    (1801.0, GLYPH_4),
    (2101.0, GLYPH_5),
    (2401.0, GLYPH_6),
    (3001.0, GLYPH_7),
];
pub(super) const MIN_OVERLAP: f64 = 20.0;
pub(super) const PARTS: &[Part] = &[
    Part {
        glyph: GLYPH_8,
        full: 750.0,
        start: 0.0,
        end: 374.0,
        extender: false,
    },
    Part {
        glyph: GLYPH_9,
        full: 748.0,
        start: 748.0,
        end: 748.0,
        extender: true,
    },
    Part {
        glyph: GLYPH_10,
        full: 1500.0,
        start: 374.0,
        end: 374.0,
        extender: false,
    },
    Part {
        glyph: GLYPH_9,
        full: 748.0,
        start: 748.0,
        end: 748.0,
        extender: true,
    },
    Part {
        glyph: GLYPH_11,
        full: 750.0,
        start: 374.0,
        end: 0.0,
        extender: false,
    },
];