Giter Site home page Giter Site logo

kernagic's People

Contributors

ctrlcctrlv avatar davelab6 avatar hodefoting 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

Watchers

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

kernagic's Issues

Feature request - save parameter settings in UFO file

Woud it be possible to save the settings of the different kernagic parameters into the UFO files, so that if a UFO that has been spaced with kernagic is opened later by Kernagic, the parameters can be loaded from the 'saved state'?
At the moment all the parameter settings are lost when the UFO is closed by Kernagic.

Implement hz kerning algorithm

When at URW, Peter Karow and Hermann Zapf released a proprietary application called hz-program that implemented (among other things) automatic kerning. It was patented in 1992, so the patent has now expired. It would be interesting to re-implement the algorithm in free software.

Crash in gen_debug

When I try to open Source Sans Pro (Regular) from U. F. O., kernagic crashes at ufo-glyph-parser.c:479. It is not clear what value is at fault. I notice that ink_width is greater than r_width (the raster width), which seems dangerous in this context since the x value in the raster is bounded by the ink_width. Is that wrong?

Crash on start

Current git head just crashes for me on start:

Script started on Sun Sep 22 18:06:51 2013
(lldb) Executing commands in 'kernagic-debug.txt'.
(lldb)  version
LLDB-179.5
(lldb)  settings set frame-format "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}`${function.name-with-args}{${function.pc-offset}}}{ at ${line.file.basename}:${line.number}}\n"
(lldb)  target create /usr/local/bin/kernagic
Current executable set to '/usr/local/bin/kernagic' (x86_64).
(lldb)  target select 0
Current targets:
* target #0: /usr/local/bin/kernagic ( arch=x86_64-apple-macosx, platform=localhost )
(lldb)  run
Process 34472 launched: '/usr/local/bin/kernagic' (x86_64)
Command #5 'run' continued the target.


(kernagic:34472): Gtk-CRITICAL **: gboolean gtk_file_chooser_select_filename(GtkFileChooser *, const gchar *): assertion `filename != NULL' failed



(kernagic:34472): Gdk-WARNING **: shmget failed: error 12 (Cannot allocate memory)


�[KProcess 34472 stopped
* thread #1: tid = 0x1c03, 0x00007fff894f3670 libsystem_c.dylib`strlen + 16, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    "frame #0: 0x00007fff894f3670 libsystem_c.dylib`strlen + 16
"libsystem_c.dylib`strlen + 16:
-> 0x7fff894f3670:  pcmpeqb(%rdi), %xmm0
   0x7fff894f3674:  andl   $15, %ecx
   0x7fff894f3677:  shll   %cl, %eax
   0x7fff894f3679:  pmovmskb%xmm0, %ecx
(lldb) bt

* thread #1: tid = 0x1c03, 0x00007fff894f3670 libsystem_c.dylib`strlen + 16, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
    "frame #0: 0x00007fff894f3670 libsystem_c.dylib`strlen + 16
"    "frame #1: 0x0000000100005b6d kernagic`kernagic_load_ufo + 86
"    "frame #2: 0x000000010000b3da kernagic`delayed_reload_trigger + 70
"    "frame #3: 0x00000001008b8da6 libglib-2.0.0.dylib`g_timeout_dispatch + 20
"    "frame #4: 0x00000001008bb6e3 libglib-2.0.0.dylib`g_main_context_dispatch + 276
"    "frame #5: 0x00000001008bba03 libglib-2.0.0.dylib`g_main_context_iterate + 418
"    "frame #6: 0x00000001008bbc57 libglib-2.0.0.dylib`g_main_loop_run + 207
"    "frame #7: 0x00000001000d7d94 libgtk-x11-2.0.0.dylib`gtk_main + 179
"    "frame #8: 0x000000010000a8f0 kernagic`ui_gtk + 4574
"    "frame #9: 0x00007fff89fca7e1 libdyld.dylib`start + 1
"(lldb) q



Script done on Sun Sep 22 18:07:03 2013

Cannot make with CFLAGS="-g -O0"

Not sure how I can debug a crash I found since it won't make the debug version...however just typing make works fine.

[fred@pc kernagic]$ make CFLAGS="-g -O0"
CCLD kernagic
gimpspinscale.c: In function ‘gimp_spin_scale_class_init’:
gimpspinscale.c:141:3: warning: ‘g_type_class_add_private’ is deprecated [-Wdeprecated-declarations]
   g_type_class_add_private (klass, sizeof (GimpSpinScalePrivate));
   ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
                 from /usr/include/glib-2.0/gobject/gbinding.h:29,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from gimpspinscale.c:27:
/usr/include/glib-2.0/gobject/gtype.h:1303:10: note: declared here
 void     g_type_class_add_private       (gpointer                    g_class,
          ^~~~~~~~~~~~~~~~~~~~~~~~
ui-gtk.c:51:19: error: ‘index’ redeclared as different kind of symbol
 static GtkWidget *index = NULL;
                   ^~~~~
In file included from /usr/include/string.h:431,
                 from /usr/include/glib-2.0/glib/gtestutils.h:30,
                 from /usr/include/glib-2.0/glib.h:85,
                 from /usr/include/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:23,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30,
                 from /usr/include/gtk-2.0/gdk/gdk.h:32,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from ui-gtk.c:18:
/usr/include/strings.h:68:14: note: previous declaration of ‘index’ was here
 extern char *index (const char *__s, int __c)
              ^~~~~
make: *** [.mm/bin:15: kernagic] Error 1

make fails

I don’t know if I’m missing some dependency (couldn’t find a list of them) but make fails with the following message (I have no idea what it means):

CCLD kernagic
/usr/bin/ld: /tmp/cc2Kk0V6.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'
/usr/bin/ld: note: 'fmod@@GLIBC_2.2.5' is defined in DSO /usr/lib/libm.so.6 so try adding it to the linker command line
/usr/lib/libm.so.6: could not read symbols: Invalid operation
collect2: Fehler: ld gab 1 als Ende-Status zurück
make: *** [kernagic] Fehler 1

I’m on an up-to-date 64bit arch linux.

Default Cadence Units Table file

The default table file is a bit rough at the moment, and basically a bit wrong too with its 24 units. Because of the repeated division of units into halves, the value should be a power of two.

cadence_units_base

The default file will work more or less for serifed fonts, but is not very useful for sans serifs. It makes more sense to immediately offer the end user a choice between tables for for instance Renaissance roman, Humanist sans, Grotesk, 'modern' roman, 'modern' sans, etc., which come with Kernagic. The program should by default point at the folder where the tables are stored, but the user should be able to change this, for instance in the preferences.

The units from the table should be visible in Kernagic and preferably the user should be able to change the spacing by clicking on the units. Even nicer would be the additional showing of the actual units for the side bearings, with the option to numerically change these. Subsequently the user should be able to save the outcome into a new table.

Don't use a dot folder for makefile includes

The Makefile includes from .mm. Files with names that start with a dot are considered "hidden" on UNIX systems, and won't show in for instance ls.

I'm not sure that this folder needs to be hidden, perhaps it could be renamed to something without a dot.

Classes

It would be nice if the table would support classes for character fitting:

A [Ä Â Å À Á] extreme 2 extreme 2

In case of zones-support, i.e., x-height (x), ascender (a), descender (d), it could for instance look like this:

A [Ä Â Å À Á] extreme 2x extreme 2x
g [ğ ģ] extreme 5d extreme 1x

Crash when opening UFO

UFO was opened ok, and used in kernagic without issue, untill crash occured. From then kernagic fails when opening same UFO file.
backtrace from gdb;

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000105b41000
0x000000010000b2d4 in gen_debug ()
(gdb) bt

#0  0x000000010000b2d4 in gen_debug ()
#1  0x0000000100008f83 in kernagic_load_ufo ()
#2  0x000000010000c632 in delayed_reload_trigger ()
#3  0x00000001008646f0 in g_timeout_dispatch ()
#4  0x00000001008670f1 in g_main_context_dispatch ()
#5  0x0000000100867405 in g_main_context_iterate ()
#6  0x000000010086764f in g_main_loop_run ()
#7  0x00000001000f0222 in gtk_main ()
#8  0x000000010000dc1e in ui_gtk ()
#9  0x00007fff8b8285fd in start ()

brew can't find kernagic

Did the Mac install method previously work (brew install kernagic)? If a local build is required now, it would be great to document

Error: No available formula with the name "kernagic"
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

Problem compiling

Won't compile for me

$ make
CCLD kernagic
clang: warning: argument unused during compilation: '-rdynamic'
clang: warning: argument unused during compilation: '-fforce-addr'
clang: warning: argument unused during compilation: '-ftracer'
clang: warning: argument unused during compilation: '-fpeel-loops'
error: invalid integral value 'fast' in '-Ofast'
error: invalid integral value 'fast' in '-Ofast'
make: *** [kernagic] Error 1

The f-bug and g-bug

f-bug

In case of the f the terminal is taken as extreme instead of the cross bar. This a bug and it has been there for more than a year now. In case of the g, the left extreme seems also to be taken from outside the x-height. To end this and to make the system more flexible, I think the area (for the moment: x-height, ascender, or descender) should be part of the Cadence Units Table (CUT) file, i.e., user-definable. If Kernagic is going to be used for kerning (defined in cadence units, of course), then this is required too.

Add installation instruction for Linux

Actual behavior

Installation instruction in README.md actually describe process only for Windows & Mac.

Expected behavior

Add installation instruction for Linux.

Segfault just by clicking white box

Just clicking the white area in the bottom left of the image below causes a segmentation fault.

krnagic

Thread 1 "kernagic" received signal SIGSEGV, Segmentation fault.
0x00005555555638b8 in index_press_cb (widget=0x5555558c5650, event=0x55555597d6a0, data=0x0)
    at ui-gtk.c:631
631       for (l = list; l->next; l = l->next)
(gdb) bt
#0  0x00005555555638b8 in index_press_cb
    (widget=0x5555558c5650, event=0x55555597d6a0, data=0x0) at ui-gtk.c:631
#1  0x0000155554e187cc in  () at /usr/lib/libgtk-x11-2.0.so.0
#2  0x000015555462ae75 in g_closure_invoke () at /usr/lib/libgobject-2.0.so.0
#3  0x0000155554617fd5 in  () at /usr/lib/libgobject-2.0.so.0
#4  0x000015555461b76d in g_signal_emit_valist () at /usr/lib/libgobject-2.0.so.0
#5  0x000015555461d080 in g_signal_emit () at /usr/lib/libgobject-2.0.so.0
#6  0x0000155554f33235 in  () at /usr/lib/libgtk-x11-2.0.so.0
#7  0x0000155554e16a0e in gtk_propagate_event () at /usr/lib/libgtk-x11-2.0.so.0
#8  0x0000155554e16e43 in gtk_main_do_event () at /usr/lib/libgtk-x11-2.0.so.0
#9  0x0000155554a8fd5e in  () at /usr/lib/libgdk-x11-2.0.so.0
#10 0x000015555453d7bf in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#11 0x000015555453f739 in  () at /usr/lib/libglib-2.0.so.0
#12 0x00001555545406d2 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#13 0x0000155554e15df3 in gtk_main () at /usr/lib/libgtk-x11-2.0.so.0
#14 0x00005555555653c7 in ui_gtk (argc=1, argv=0x7fffffffe1a8) at ui-gtk.c:1042
#15 0x000055555555e195 in main (argc=1, argv=0x7fffffffe1a8) at kernagic.c:706

Cadencing italics

First experiments seem to prove that italic type can be treated similarly as roman type if skewed upwards.

kernagic_italic

Incorrect definition of 'base' units

cu_n_kernagic

Currently Kernagic calculates n-basis from left of left stem to right of right stem of lower-case n (see above), instead of from left of left stem to left of right stem (see below). Because the latter distance is the stem-interval and the stem-thickness is not always the same, this makes the interpretation of the tables slightly inaccurate (the value should be adapted then to the font in question [not too difficult to calculate]). One can adjust this by changing the number of defined units in the table header, but this is actually a bug.

cu_n_32

Crash - missing components seems to cause crash?

Problems importing 'uni021B' maybe the component commaaccentcomb is using components
Problems importing 'uni021A' maybe the component commaaccentcomb is using components
Problems importing 'uni0215' maybe the component dblgravecmb is using components
Problems importing 'uni0214' maybe the component dblgravecmb is using components
Problems importing 'uni0211' maybe the component dblgravecmb is using components
Problems importing 'uni0210' maybe the component dblgravecmb is using components
Problems importing 'uni020D' maybe the component dblgravecmb is using components
Problems importing 'uni020C' maybe the component dblgravecmb is using components
Problems importing 'uni0209' maybe the component dblgravecmb is using components
Problems importing 'uni0208' maybe the component dblgravecmb is using components
Problems importing 'uni0205' maybe the component dblgravecmb is using components
Problems importing 'uni0204' maybe the component dblgravecmb is using components
Problems importing 'uni0201' maybe the component dblgravecmb is using components
Problems importing 'uni0200' maybe the component dblgravecmb is using components
Problems importing 'Scommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'scommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'Rcommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'rcommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'Ncommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'ncommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'Lcommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'lcommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'Kcommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'kcommaaccent' maybe the component commaaccentcomb is using components
Problems importing 'Gcommaaccent' maybe the component commaaccentcomb is using components

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000001030
0x000000010000c42a in glif_start_element ()
(gdb) bt

#0  0x000000010000c42a in glif_start_element ()
#1  0x000000010086ab0b in emit_start_element ()
#2  0x000000010086a100 in g_markup_parse_context_parse ()
#3  0x000000010000af52 in render_glyph ()
#4  0x000000010000b4e6 in render_ufo_glyph ()
#5  0x0000000100008f83 in kernagic_load_ufo ()
#6  0x000000010000c632 in delayed_reload_trigger ()
#7  0x00000001008646f0 in g_timeout_dispatch ()
#8  0x00000001008670f1 in g_main_context_dispatch ()
#9  0x0000000100867405 in g_main_context_iterate ()
#10 0x000000010086764f in g_main_loop_run ()
#11 0x00000001000f0222 in gtk_main ()
#12 0x000000010000dc1e in ui_gtk ()
#13 0x00007fff8b8285fd in start ()

make failing on Ubuntu 13.04

Tried compilation on Ubuntu 13.04, 64b; it throws out "undefined reference"s to GTK+ and GLib stuff (and the dev libs are installed).

So more or less the same symptom georgd was seeing, but this is a fresh pull, with LDFLAGs += -lm. Not clear to me why that fix would not link up everything correctly on this distro....

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.