Giter Club home page Giter Club logo

runebender's People

Contributors

belluzj avatar cmyr avatar davelab6 avatar dependabot[bot] avatar eliheuer avatar kud1ing avatar maan2003 avatar markmccaskey avatar raphlinus avatar ratmice avatar spl avatar xorgy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

runebender's Issues

Integrate VCS‌ as a first class part of the tool

I would like to propose adding some VCS integration on a first-class basis — not to make the font editor a full Git client of course, just to facilitate the bits where the font editor has more idea what is what than a third party generic VCS app would.

First detect whether the file being edited is also tracked in Git. If not, nothing changes. If so, add some options.

  • A "commit" option along side save that would save, stage, and commit the relevant UFO files. An extra check should probably make sure the rest of the repository status is clean before enabling this and show the feature disabled if the cache has anything in it.

  • Add a "revert" option that is basically an aggressive undo that backtracks to the last committed version. Perhaps this would function by stashing the current change, then resetting the file.

  • Add comparison functions such as a glyph editor background that shows a greyed out outline of the last commited state of a glyph. The git object store can be queried directly for the last saved object.

More is certainly possible, but if VCS was brought in as a first class part of the tooling I think the overall workflow could be radically different (and better) than any other tooling that is out there.

If this is an agreeable proposition I'm even willing to help out a bit with some implementation work. I'm not much of a graphic designer but I do have a pretty deep understanding of how Git works and I'm just getting up to speed with Rust.

Rethink "not created here" save failure

currently we categorically refuse to save any file that we did not create, with the rationale that our save operation is going to be lossy; there are parts of the UFO that we do not currently bother loading, and we only save what we've loaded.

This seems a bit zealous, though; it would make more sense to just refuse to save over a file we didn't create, but we should be okay with letting people do "save as" and creating a new file.

(see #178)

toolbar

We need some sort of toolbar; a row or column of icons representing available tools, with the current tool indicated.

always save atomically

Currently we're trying to save in place, which means if we error at some point in the saving process we destroy data. We should try to save in a temporary location, and then move that to the final location when save succeeds.

Support opening metainfo.plist on Windows

The Windows file picker can't "open" a .ufo as a file. Font editors on Windows commonly do "UFO package (*.ufo|metainfo.plist)" and then you click the metainfo.plist file. Note that you need to do path manipulation to toss metainfoplist out again to get the true UFO path.

Add an option to change the first segment (node)

This option could just be something in the paths menu with a label like "make selected node first".

This would be useful for a variety of reasons, but mainly it is important for variable fonts. If two paths have the same point structure, but different first segments, the interpolated in-between shapes will be twisted and unrecognizable.

Maybe I could figure out a PR for this using src/draw.rs/draw_direction_indicator as a starting point.

Crash on backspace while using pen tool

Sorry I don't know the correct term for this state of the pen tool but here is my process to recreate:

select the pen tool

  1. click to draw one point
  2. click to draw second point
  3. click and drag while drawing third point to pull out a curve
  4. let go of click (don't click again)
  5. hit backspace

I get

thread 'main' panicked at 'index out of bounds: the len is 4 but the index is 4', src/draw.rs:195:30

Display width and height of selection bbox

When more than one point is selected, display the width and height of the bbox enclosing the selection points. Among other things, this is a very useful mini-measure tool.

The second stage of this feature would be making them editable labels, and having updates to them drive a scale transformation. But I think that's much less used. I'm inclined to implement mouse-driven scaling by dragging handles associated with the selection bbox first.

no `platform` in the root when compiling `druid-shell` dependency of `runebender`

   Compiling druid-shell v0.2.0 (https://github.com/xi-editor/druid/?rev=1c9da82f871a04b4f4ca680f105ab82925235883#1c9da82f)
error[E0432]: unresolved import `crate::platform`
  --> /home/fred/.cargo/git/checkouts/druid-1a6b6c4d20db75fe/1c9da82/druid-shell/src/window.rs:20:5
   |
20 | use crate::platform;
   |     ^^^^^^^^^^^^^^^ no `platform` in the root

error[E0432]: unresolved import `platform`
  --> /home/fred/.cargo/git/checkouts/druid-1a6b6c4d20db75fe/1c9da82/druid-shell/src/lib.rs:46:9
   |
46 | pub use platform::application;
   |         ^^^^^^^^ use of undeclared type or module `platform`

error[E0432]: unresolved import `platform`
  --> /home/fred/.cargo/git/checkouts/druid-1a6b6c4d20db75fe/1c9da82/druid-shell/src/lib.rs:47:9
   |
47 | pub use platform::dialog;
   |         ^^^^^^^^ use of undeclared type or module `platform`

error[E0432]: unresolved import `platform`
  --> /home/fred/.cargo/git/checkouts/druid-1a6b6c4d20db75fe/1c9da82/druid-shell/src/lib.rs:48:9
   |
48 | pub use platform::menu;
   |         ^^^^^^^^ use of undeclared type or module `platform`

error[E0432]: unresolved import `platform`
  --> /home/fred/.cargo/git/checkouts/druid-1a6b6c4d20db75fe/1c9da82/druid-shell/src/lib.rs:49:9
   |
49 | pub use platform::util;
   |         ^^^^^^^^ use of undeclared type or module `platform`

error[E0432]: unresolved import `platform`
  --> /home/fred/.cargo/git/checkouts/druid-1a6b6c4d20db75fe/1c9da82/druid-shell/src/lib.rs:50:9
   |
50 | pub use platform::win_main; // TODO: rename to "runloop"
   |         ^^^^^^^^ use of undeclared type or module `platform`

error: aborting due to 6 previous errors

For more information about this error, try `rustc --explain E0432`.
error: Could not compile `druid-shell`.
warning: build failed, waiting for other jobs to finish...
error: build failed

Crash when clicking while context menu is open

OS: Windows 10

Steps to reproduce:

  1. Open runebender via cargo run
  2. double-click any of the empty glyphs to open the editor
  3. Right-click to open the context menu and immediately left-click anywhere on the canvas. It's importand that the mouse is moved a few pixels so you don't click on the border of the context menu, and it has to happen quite quick. You might have to try this a few times and really fast, but I also had it happen on first try.

Here's a screen cap showing it:
Desktop 2020.10.21 - 17.26.29.08.mp4.zip

And here's the full terminal output:

> cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.30s                                                                                                                                   
     Running `target\debug\runebender.exe`
DEBUG [druid::localization] available locales [], current en-US
DEBUG [druid::localization] resolved: [en-US]
DEBUG [druid_shell::platform::windows::window] dxgi factory pointer = 0x29769773100
DEBUG [druid_shell::platform::windows::window] 0x2976977c410: desc = Some("NVIDIA GeForce GTX 980 Ti"), vram = 6393823232
DEBUG [druid_shell::platform::windows::window] 0x29769778620: desc = Some("Microsoft Basic Render Driver"), vram = 0
DEBUG [druid_shell::platform::windows::window] adapter = 0x2976977c410
DEBUG [druid_shell::platform::windows::window] swap chain res = 0x0, pointer = 0x2976b7504a0
WARN  [druid_shell::hotkey] warning: HotKey HotKey { mods: Shift, key: Character("u") } includes shift, but text is lowercase. Text is matched literally; this may cause problems.
DEBUG [druid_shell::platform::windows::window] dxgi factory pointer = 0x29777353eb0
DEBUG [druid_shell::platform::windows::window] 0x29777354270: desc = Some("NVIDIA GeForce GTX 980 Ti"), vram = 6393823232
DEBUG [druid_shell::platform::windows::window] 0x29777354700: desc = Some("Microsoft Basic Render Driver"), vram = 0
DEBUG [druid_shell::platform::windows::window] adapter = 0x29777354270
DEBUG [druid_shell::platform::windows::window] swap chain res = 0x0, pointer = 0x297774d1e60
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x53d2e
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x205, hwnd=0x53d2e, wparam=0x0, lparam=0x1790289
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x205, hwnd=0x53d2e, wparam=0x0, lparam=0x13a026b
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x205, hwnd=0x53d2e, wparam=0x0, lparam=0x152023a
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x205, hwnd=0x53d2e, wparam=0x0, lparam=0x12c022c
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x205, hwnd=0x53d2e, wparam=0x0, lparam=0x12b0235
ERROR [druid_shell::platform::windows::window] dropped message 0x215, hwnd=0x53d2e, wparam=0x0, lparam=0x0
ERROR [druid_shell::platform::windows::window] dropped message 0x2a3, hwnd=0x53d2e, wparam=0x0, lparam=0x0
thread 'main' panicked at 'already borrowed: BorrowMutError', C:\***\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\src\libcore\cell.rs:877:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\runebender.exe` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)

Suggestion for installation hints on macOS

This is probably too early, but i've found that on a Mac i need to call something like

export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig"

in order to make runebender compile. Otherwise i'd got

Package libffi was not found in the pkg-config search path.

while compiling cairo-sys-rs.

adding components

This is actually fairly tricky, because it requires us to provide UI for selecting the component to add from a list of available glyphs.

A first pass at this would maybe just be a text input field, which would validate on submit.

A simplish nicer option might be a dropdown list of available glyphs; and then there are fancier search-panel options beyond that.

I'm setting this as a goal for the alpha, but I'm willing to push it if it's too much work.

ability to select glyphs in grid view

currently in the grid view when you click on a glyph it opens the editor. We should be able to select a glyph on single click, which will allow editing of glyph metadata, advance, kerning, etc.

Add support for global guides

Adding a guide to a glyph is cool, but in order to be useful I think the guides need to show up on all glyphs rather than just the one it was added too.

option to show coordinates of points on hover

How we want to surface this sort of information is a fairly big design question, but at the very least it would be nice if we could see the actual coordinates of a point during editing.

Save deletes UFO source

Working with the same source as #177, hitting File→Save has the (unexpected) effect of deleting the UFO sources entirely. The console messages imply something else:

INFO  [runebender::data] saving to "sources/OstrichSans-InlineItalic.ufo/"
ERROR [runebender::app_delegate] saving failed: 'To prevent data loss, norad will not save files created elsewhere.'

If you can't save that's fine, but nuking files while claiming to prevent data-loss is a bad look ;-)

Add Screenshots

Hello, this looks like a very interesting project, would it be possible to add screenshots of how it looks currently to the README?

Double clicking anywhere in a glyph's canvas causes a panic

I am currently using the latest Git build as of an hour ago, but I actually noticed this weeks ago and never got around to reporting it.

It seems that any time I double click on the glyph canvas interface I get a panic like this:

DEBUG [druid::localization] available locales [], current en-US
DEBUG [druid::localization] resolved: [en-US]
WARN  [druid::menu] MenuDesc::platform_default is not implemented for this platform.
INFO  [druid_shell::platform::gtk::application] gtk: Activated application
WARN  [druid::menu] MenuDesc::platform_default is not implemented for this platform.
WARN  [druid::menu] MenuDesc::platform_default is not implemented for this platform.
thread 'main' panicked at 'assertion failed: prev.button != event.button', src/mouse.rs:299:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

GTK on Linux, Xorg.

Add a FontForge style spacing, metrics, and kerning window

FontForge has a useful metrics window for editing spacing, metrics, and kerning. Previewing text and testing how the font will look in different text string combinations is another use of this window. A tool of this kind is usually expected by users of font editing software.

fontforge-metrics

RoboFont also has a window in this style, which last time I used RoboFont was called the "spacecenter."

update all other instances of glyph on edit

When editing a glyph, we should invalidate all other locations where that glyph is used, such as in the grid view and in open glyphs where the changed glyph is a component.

Theming

Currently, styling decisions are hardcoded, but there has been some discussion about using TOML files for setting values relating to colors, lines, fonts, margins, etc. This way, the theme used for the UI can be changed easily, and users who are comfortable building from source can make custom themes.

I think it makes sense to do this sooner rather than later so that replacing hardcoded styling decisions doesn't become a difficult task.

The initial themes could just be a light and dark theme.

Consider using the ttf-parser crate

ttf-parser is a font-rs alternative (at least right now, runebender uses it only for glyph outlining). Unlike font-rs, ttf-parser has a wider set of features. Mainly the CFF support. It also a bit faster and heavily fuzzed.

slice tool

one of the other primary tools for a font editor.

This might get cut from the initial release, but it should definitely be an early feature.

State of Libre Graphics 2020

The Libre Graphics Meeting 2020 is happening at the end of May in Rennes!

As usual, the first conference will be the State of Libre Graphics, where we will give an overview of what has happened during the last year in the world of Libre Graphics.

You're very welcome to submit two slides for your project. They will be presented by the moderator of the State of Libre Graphics.
Instructions for submitting the slides can be found in the Github repository that will contain all slides:

https://github.com/libregraphicsmeeting/state-of-lg-2020

If you have further questions, don't hesitate to open a ticket in the same repository.

And, of course, you're very welcome to join us in Rennes!

adding new glyphs to a project

Also fairly important. this will involve a bit of work in norad, to allow creation of layers and adding of glyphs to layers; it also requires a bunch of work in the grid view to allow things like changing the name of a glyph.

Recent change to GTK File Open dialoge rendered it unusable for UFO 'files'

Some recent set of changes added a filter option to the GTK File Open dialogues, and the app is now looking to open things that it understands. I assume it is looking for UFO 'files'. The problem is UFOs are not files, they are a directory structure! As such I can find them in the chooser, but when I hit "Open" it just opens the directory in the chooser and never actually opens them in the app. I can't open an UFO at all through the dialogue, the only way I can open a UFO now is to launch the app passing the UFO name as the first argument.

saving files

As a first step, I would like to implement save only for files created by runebender; files created by other tools can be viewed but not saved.

Cannot type 'h' in meta data family name field

I just tried to add a name to a UFO font and discovered that I could hit "edit" and type seemingly anything I wanted in the name field except a lower case 'h'. Uppercase was fine, other letters were fine, and I could paste an 'h' into the field, but I couldn't type one. It just ignored me.

Linux / GTK

numerical edits should participate in undo

currently editing via the numeric fields modifies glyph data via a lens, without going through the Editor struct, where undo state lives. This means it is more or less invisible for the purposes of undo.

is monospaced

It seems visual studio code estabilshes if a font can be used
by checking if the bounding box of 'i' = 'w'. If they're the same width then it will let you code with it.

Coding fonts is probably a big target market. Would be good to be able to check if a font meets the vscode criteria, and also maybe a way to force the widths to all be the same? (I've handmade audiowide mono with font forge so the widths are fairly monospaced, but font forge crashes on me so often it's hard for me to work with it anymore.)

better sorting of glyphs in list

currently this is alphabetical by name; the ideal solution would probably use something like unicode character database properties to sort by script, or block, and then in some well-defined order within those groups.

An acceptable temporary solution, to me, would be to sort by codepoint.

Regression on Linux

Seeing updates merged in #155 I rebuilt and tried to run on Linux.

I fired up a UFO (one that I'd just tested with the other day and was still in my command history) and double clicked on glyph. PANIC.

thread 'main' panicked at 'index out of bounds: the len is 16 but the index is 16', src/draw.rs:206:30

Opening it back up and trying a few more, it seems about half of the glyphs in this particular file cause panics if I try to open them, the other half are okay. It would be a strange coincidence if testing the other day I managed not to land on any of the crashy glyphs.

Side bearing display/update

A common font editor feature is to report "side bearings", which is the inset from the advance to the bounding box. To display these, use the kurbo bounding box feature on the path. Lens update is slightly trickier. The right side bearing functions much as lensing the advance, but updating the left side bearing does a nudge of all points in the glyph, as well as the advance.

This would be added to the current advance display in sidebar, but I think it would also be useful to have a metrics mini-panel on the same row as the coord pane. That could be a separate issue though, as it's UX polish rather than core functionality.

I should also point out that doing fitting using side bearings "by the number" is a bit of an antipattern, but that's just for information. An extremely common use case is "this needs 10 more units on the left".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.