Skip to content

Metricsview keybindings to incr/decr the value and move around.#19

Merged
davelab6 merged 1 commit intofontforge:masterfrom
monkeyiq:workshop2012metricsviewkeynav
Aug 21, 2012
Merged

Metricsview keybindings to incr/decr the value and move around.#19
davelab6 merged 1 commit intofontforge:masterfrom
monkeyiq:workshop2012metricsviewkeynav

Conversation

@monkeyiq
Copy link
Copy Markdown
Contributor

add key bindings to increasing/decreasing side-bearing and kerning
values by using the up, down, left, right arrow keys and alt and
shift etc combinations.

EG, User selects LBearing for a char in the metrics window table.

Changing current value:
Arrow up increases,
arrow down decreases side bearing by 1 unit.
Shift + arrow increases by 10 units.
Shift + ctl + arrow increases by 5 units.

Moving with alt+direction:
Alt+up selects table field above,
Alt+down selects field below,
Alt+left selects value in table for the char to the left,
Alt+right selects value in table for the char to the right.

The shift and shift-alt unit scales are set in Prefernces, Editing.
If the prefs.c names are OK then I'll send another pull req with the docs for these new options.

values by using the up, down, left, right arrow keys and alt and
shift etc combinations.

EG, User selects LBearing for a char in the metrics window table.

Changing current value:
  Arrow up increases,
  arrow down decreases side bearing by 1 unit.
  Shift + arrow increases by 10 units.
  Shift + ctl + arrow increases by 5 units.

Moving with alt+direction:
  Alt+up selects table field above,
  Alt+down selects field below,
  Alt+left selects value in table for the char to the left,
  Alt+right selects value in table for the char to the right.

The shift and shift-alt unit scales are set in Prefernces, Editing.
@vernnobile
Copy link
Copy Markdown
Contributor

Nice work. I had a fairly quick play & it works well. This is a great improvement to the design of metrics & kerning in fontforge :-D
One detail - and this an aspect of fontforge i never understood - when changing the value of the Left sidebearing of a character, the Width is kept constant whilst the Right side bearing gets altered. To me that is wrong, editing the Left side bearing should be the same as editing the Right side bearing - only the side bearing being edited (and therefore also the overall width) should change.

I am hoping that this new feature can treat the editing of Left and Right side bearing the way that at present Right side bearings are treated.

-v

On 20 Aug 2012, at 14:37, monkeyiq notifications@github.com wrote:

add key bindings to increasing/decreasing side-bearing and kerning
values by using the up, down, left, right arrow keys and alt and
shift etc combinations.

EG, User selects LBearing for a char in the metrics window table.

Changing current value:
Arrow up increases,
arrow down decreases side bearing by 1 unit.
Shift + arrow increases by 10 units.
Shift + ctl + arrow increases by 5 units.

Moving with alt+direction:
Alt+up selects table field above,
Alt+down selects field below,
Alt+left selects value in table for the char to the left,
Alt+right selects value in table for the char to the right.

The shift and shift-alt unit scales are set in Prefernces, Editing.
If the prefs.c names are OK then I'll send another pull req with the docs for these new options.

You can merge this Pull Request by running:

git pull https://github.com/monkeyiq/fontforge-fork workshop2012metricsviewkeynav
Or view, comment on, or merge it at:

#19

Commit Summary

add key bindings to increasing/decreasing side-bearing and kerning
File Changes

M fontforge/metricsview.c (116)
M fontforge/prefs.c (4)
M fontforge/views.h (1)
Patch Links

https://github.com/fontforge/fontforge/pull/19.patch
https://github.com/fontforge/fontforge/pull/19.diff

Reply to this email directly or view it on GitHub.

@vernnobile
Copy link
Copy Markdown
Contributor

Of course what would make this even more awesome is the ability to view characters in the Metrics Windows as a waterfall :-) Would allow a super helpfull overview of metrics & kerning values effecting different font sizes.
Please consider this a serious feature suggestion.
-v

@davelab6
Copy link
Copy Markdown
Member

I agree with Vern, Ben, please implement this as he suggests :)

@vernnobile please make feature requests in the issue tracker here on github :)

@monkeyiq
Copy link
Copy Markdown
Contributor Author

@davelab6 cool, I'll add the mod of bearing to width to my TODO list :)

Can we merge this pull request and I'll add the above change to an upcoming pull req?

@khaledhosny
Copy link
Copy Markdown
Contributor

I don't really see the need for the side bearings keys. Like every glyph elements in the char view, you can click on the left side bearing line to select it then left/right arrows move by 1 unit and alt+left/right arrows move by 10 units.

Don't get me wrong, I don't want to sound what I seem so sound (I can't find that English word :p)
, but having different ways to basically do the same thing is IMO bad feature creep (in an already bloated application that does everything and then some).

I'm not sure what the other change does, can you elaborate please.

(and of possibly, changes that unrelated things should go to separate commits, so we can selectively pick them :)

@khaledhosny
Copy link
Copy Markdown
Contributor

Oops, I missed the left part, so it is fine then except it should behave like the right side bearings I described above, and the options are not needed (the move by 5 units is an overkill).

@vernnobile
Copy link
Copy Markdown
Contributor

I'm confused :)
Khaled, which functions are you saying that fontforge can allready do?
*change side bearing and kerning values by the use of the up / down keys?
*use the left / right keys to navigate around the values in the metrics window?

I feel one less strong area within fontforge is the designing of metrics / kerning, as at the moment fontforge does't allow very quick and detailed adjustment of side bearing values, and rapid switching from the values of one char to another char. In my experience enabling these values to be edited quickly and effortlessly (with simple keys) improves the designers command over setting metrics succesfully.

I can also suggest a few basic but key aeas that would improve fontforge's metrics design;
e.g. ability to enable class based metrics and making the class based kerning more robust and useful

-v

On 21 Aug 2012, at 02:50, Khaled Hosny notifications@github.com wrote:

Oops, I missed the left part, so it is fine then except it should behave like the right side bearings I described above, and the options are not needed (the move by 5 units is an overkill).

@davelab6
Copy link
Copy Markdown
Member

@khaledhosny I definitely see the need for the sidebearing keys. I kindly ask you to review patches for technical quality and consistency with existing code, but not to veto new features; ideally all number input boxes should be incrementable with the arrow keys, its very normall in a UI toolkit to do that.

Umm I went to click 'update comment' and my browser jumped and I hit the 'merge' button by accident, sorry about that.

davelab6 added a commit that referenced this pull request Aug 21, 2012
Metricsview keybindings to incr/decr the value and move around.
@davelab6 davelab6 merged commit 6f811d2 into fontforge:master Aug 21, 2012
@georgd
Copy link
Copy Markdown

georgd commented Aug 21, 2012

I think, Khaled is doing a good job in checking consistency with current ui
behaviour. I think, the current development is great with all the new
features arriving almost hourly, but we shouldn't sacrifice a good and
consistent interface to the speed of development. It won't hurt if a new
feature is integrated a day later but better checked for consistency.
Am 21.08.2012 14:50 schrieb "Dave Crossland" notifications@github.com:

@khaledhosny https://github.com/khaledhosny I definitely see the need
for the sidebearing keys. I kindly ask you to review patches for technical
quality and consistency with existing code, but not to veto new features.


Reply to this email directly or view it on GitHubhttps://github.com//pull/19#issuecomment-7899865.

khaledhosny added a commit that referenced this pull request Aug 27, 2012
I don't know why it is crshing now (may be the resources?) as this code have
been like that since the dawn of time.

Traceback:

  0xb78289b0 in check_image_buffers (gdisp=0x84d5c78, neww=<optimized out>, newh=7, is_bitmap=0) at gimagexdraw.c:1705
  1705	    if ( width > gdisp->gg.iwidth || depth!=gdisp->gg.img->depth ) {
  (gdb) bt
  #0  0xb78289b0 in check_image_buffers (gdisp=0x84d5c78, neww=<optimized out>, newh=7, is_bitmap=0) at gimagexdraw.c:1705
  #1  0xb782b595 in gximage_to_ximage (image=0x8527ff0, src=0xbfffa0a0, gw=<optimized out>) at gimagexdraw.c:1778
  #2  0xb782e8c2 in _GXDraw_Image (_w=0x9bf4bb0, image=<optimized out>, src=0xbfffa0a0, x=8250, y=7) at gimagexdraw.c:1981
  #3  0xb7807a98 in GDrawDrawScaledImage (w=0x9bf4bb0, img=0x8527ff0, x=8250, y=7) at gdraw.c:488
  #4  0xb781b513 in GListMarkDraw (pixmap=0x9bf4bb0, x=8250, y=1, height=19, state=gs_enabled) at ggadgets.c:482
  #5  0xb788c493 in GMatrixEdit_SubExpose (gme=0x9bd9448, pixmap=0x9bf4bb0, event=0xbfffa400) at gmatrixedit.c:1691
  #6  0xb788c6b1 in matrixeditsub_e_h (gw=0x9bf4bb0, event=0xbfffa400) at gmatrixedit.c:1723
  #7  0xb78040da in _GWidget_Container_eh (gw=0x9bd9178, event=0xbfffa400) at gcontainer.c:269
  #8  0xb7878001 in dispatchEvent (gdisp=0x84d5c78, event=0xbfffa5ec) at gxdraw.c:3959
  #9  0xb7878162 in GXDrawProcessOneEvent (gdisp=0x84d5c78) at gxdraw.c:3991
  #10 0xb7808606 in GDrawProcessOneEvent (gdisp=0x84d5c78) at gdraw.c:748
  #11 0x080c77ff in ContextChainEdit (sf=0x9aa3c68, fpst=0x8ad982c, gfi=0x9afbfc0, newname=0x0, layer=1) at contextchain.c:3207
  #12 0x0818f14a in _LookupSubtableContents (sf=0x9aa3c68, sub=0x8a9d43c, sd=0x0, def_layer=1) at lookupui.c:5531
  #13 0x0813138d in LookupSubtableContents (gfi=0x9afbfc0, isgpos=0) at fontinfo.c:5941
  #14 0x08136a16 in LookupMouse (gfi=0x9afbfc0, isgpos=0, event=0xbfffe930) at fontinfo.c:7336
  #15 0x08136ccc in lookups_e_h (gw=0x9b98230, event=0xbfffe930, isgpos=0) at fontinfo.c:7380
  #16 0x08136d78 in gsublookups_e_h (gw=0x9b98230, event=0xbfffe930) at fontinfo.c:7399
  #17 0xb788f3b0 in drawable_e_h (pixmap=0x9b98230, event=0xbfffe930) at gdrawable.c:219
  #18 0xb78048a7 in _GWidget_Container_eh (gw=0x9b98230, event=0xbfffe930) at gcontainer.c:393
  #19 0xb7878001 in dispatchEvent (gdisp=0x84d5c78, event=0xbfffeb1c) at gxdraw.c:3959
  #20 0xb7878480 in GXDrawEventLoop (gd=0x84d5c78) at gxdraw.c:4058
  #21 0xb78086c1 in GDrawEventLoop (gdisp=0x84d5c78) at gdraw.c:766
  #22 0x0822457c in main (argc=1, argv=0xbffff134) at startui.c:1501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants