MFEK / glif

A stand-alone glyph viewer and editor (UFO .glif). (ꞵ quality)
Apache License 2.0
189 stars 14 forks source link

Point type gets set to PointType::Undefined when drawing a new contour. #336

Closed MatthewBlanchard closed 2 years ago

MatthewBlanchard commented 2 years ago

When using the pen tool refigure_point_types sets the pointtype to undefined when drawing a new contour.

ctrlcctrlv commented 2 years ago

Wait a second this bug isn't vaild after all @MatthewBlanchard. image

This is on master.

This is MFEKglif v1.1.1b2-28-gc6c24d2 (“Metafontverse”), compiled @ 2022年10月03日(月) 11時38分11秒(午前) 協定世界時-0400.
[2022-10-03T15:40:02Z WARN  glifparser::outline::create] Dropped empty contour. Lone `move` point in .glif? GlifContour: [GlifPoint { x: Float(809.412), y: Float(95.666), smooth: true, name: None, ptype: Move }]
[2022-10-03T15:40:02Z WARN  glifparser::outline::create] Dropped empty contour. Lone `move` point in .glif? GlifContour: [GlifPoint { x: Float(809.412), y: Float(95.666), smooth: true, name: None, ptype: Move }]
[2022-10-03T15:40:02Z WARN  glifparser::outline::create] Dropped empty contour. Lone `move` point in .glif? GlifContour: [GlifPoint { x: Float(632.01), y: Float(148.394), smooth: true, name: None, ptype: Move }]
[2022-10-03T15:40:02Z WARN  glifparser::outline::create] Dropped empty contour. Lone `move` point in .glif? GlifContour: [GlifPoint { x: Float(396.898), y: Float(251.333), smooth: true, name: None, ptype: Move }]
[2022-10-03T15:40:02Z INFO  mfek_ipc::module] "/home/fred/.local/bin/MFEKmetadata" found (OK)
[2022-10-03T15:40:02Z WARN  MFEKglif::ipc] Failed to get italic angle. Either not in font (font not italic), or font corrupt.
[2022-10-03T15:40:02Z WARN  MFEKglif::ipc] Failed to get ascender/descender. Not in font, or font corrupt.
[2022-10-03T15:40:02Z WARN  MFEKglif::ipc] Failed to get font-level guidelines. Not in font, or font corrupt.
[2022-10-03T15:40:02Z INFO  MFEKglif::settings] Configuration directory is "/home/fred/.config/MFEK/glif"
[2022-10-03T15:40:54Z WARN  MFEKglif::editor::io] Quit, discarding unsaved changes

Feel free to reopen this but I think you are just misremembering, as the change to open paths by default was added by you! :joy:

3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 151)             // Lastly if we get here we create a new contour.
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 152)             let mouse_pos = mouse_info.position;
edd0b264 src/tools/pen.rs  (Matthew Blanchard 2022-06-06 21:21:05 -0400 153)             v.contour_idx = {
edd0b264 src/tools/pen.rs  (Matthew Blanchard 2022-06-06 21:21:05 -0400 154)                 let layer = v.get_active_layer_mut();
ea869774 src/tools/pen.rs  (Fredrick Brennan  2021-11-25 01:41:19 -0500 155)                 let mut new_contour: Contour<MFEKGlifPointData> = Vec::new();
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 156)                 new_contour.push(Point::from_x_y_type(
34dc459d src/tools/pen.rs  (Fredrick Brennan  2022-01-06 01:50:47 -0500 157)                     (mouse_pos.0 as f32, mouse_pos.1 as f32),
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 158)                     if mouse_info.modifiers.shift {
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 159)                         PointType::Curve
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 160)                     } else {
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 161)                         PointType::Move
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 162)                     },
3aa3c734 src/tools/pen.rs  (Matthew Blanchard 2021-08-23 04:20:13 -0400 163)                 ));
8267678a src/tools/pen.rs  (Matthew Blanchard 2021-04-21 06:48:05 -0400 164)
ctrlcctrlv commented 2 years ago

Even single points aren't getting mismarked. image

image