Hi Martin,
If you are interested in trying to add improvements and fixes to FontForge, the first thing you need to do is see if you are able to build and compile FontForge on your computer, otherwise it will be difficult to test your fixes and improvements. I am unfamiliar with the MAC, but understand there is homebrew as a method of install. This appeared to show at the top of the list (using homebrew): https://www.davidlanier.com/blog/2012/1/how-to-install-fontforge-mac-os-x- lion-homebrew If you are using Linux, you will need to load some developer utilities, such as gcc before trying to build it. If you are using a Debian based distro, such as Ubuntu, Mint, or others, this may help: https://fontforge.github.io/en-US/downloads/gnulinux/ ...likewise, for RPM based distros such as Fedora, RedHat, SuSE, Mageia, etc. Pick-up the latest FontForge source: https://github.com/fontforge/fontforge Assuming you successfully compiled the program, installed it, and tried running it, the next thing you want to try, is tweak a few files and try compile and install again. Easiest way to do this is add some printf("I'm here\n); sort of lines in a file of interest...you could see an example of this in gutils/unicodelibinfo.c where you'l see some commented fprintf() in various locations. ...this is a follow-up from user-list: "Re: [fontforge-users] abrupt exits and a question" ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
I succeeded in compiling FontForge without too much trouble. My experience might help others.
I have a Mac OS X desktop and a Linux Mint laptop, both with the latest OS versions. Linux was an easy choice. Linux was made for development. I didn’t really follow your instructions. On the laptop, I just went to fontforge.github.io where I saw a link named “Development” and clicked it. From there I went to CONTRIBUTING.md in one browser tab and INSTALL-git.md in another. First, as at the top of the install tab, I “[c]lone[d] a copy of the Github source repository." Next, the install tab had library installation commands for some distros, but not for Mint. So I used the library list in the contributing tab, installing all the -dev branches I could find in Synaptic Package Manager, except libungif and libX, which Synaptic couldn’t find. Then I went back to the install tab and jumped to “Now run the build and installation scripts….” The bootstrap command quit instantly, complaining about a few missing libraries. Synaptic found all but libtoolize, but I installed libtool instead (the -dev branch, of course). When libtoolize complained about missing ltdl, I installed libltdl. Then bootstrap ran to completion. Next step, configure, ran without any problems. The list of optional libraries at the end showed that libgif and libreadline were missing. QUESTION: after I install those libraries, can I include them by just running bootstrap, configure, etc., from the beginning? The make step also ran without trouble. I noticed as the messages flew by that there were a lot of return values ignored. I’m sure at least some of those return values should be used in the code to make sure requested memory is actually allocated and that unallocated memory is not addressed. Next: make install, ldconfig, and now FontForge is in the application menu and starts up when its menu entry is clicked. I didn’t try to load any fonts, just verified that it exists and can be invoked. > On Jun 1, 2016, at 2:25 AM, Jose Da Silva <[hidden email]> wrote: > > Hi Martin, > If you are interested in trying to add improvements and fixes to FontForge, > the first thing you need to do is see if you are able to build and compile > FontForge on your computer, otherwise it will be difficult to test your fixes > and improvements. > > I am unfamiliar with the MAC, but understand there is homebrew as a method > of install. This appeared to show at the top of the list (using homebrew): > https://www.davidlanier.com/blog/2012/1/how-to-install-fontforge-mac-os-x- > lion-homebrew > > If you are using Linux, you will need to load some developer utilities, > such as gcc before trying to build it. If you are using a Debian based > distro, such as Ubuntu, Mint, or others, this may help: > https://fontforge.github.io/en-US/downloads/gnulinux/ > ...likewise, for RPM based distros such as Fedora, RedHat, SuSE, Mageia, > etc. > > Pick-up the latest FontForge source: > https://github.com/fontforge/fontforge > > Assuming you successfully compiled the program, installed it, and tried > running it, the next thing you want to try, is tweak a few files and try > compile and install again. Easiest way to do this is add some printf("I'm > here\n); sort of lines in a file of interest...you could see an example of > this in gutils/unicodelibinfo.c where you'l see some commented fprintf() in > various locations. > > ...this is a follow-up from user-list: > "Re: [fontforge-users] abrupt exits and a question" -- Marty Martin B. Brilliant at home in Holmdel, NJ ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
Thanks Martin! Please do consider editing the developer docs on Github to improve them :D
------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by marty39
Glad to hear you cloned the github source, this will make it easier to
push-back some pull requests....however...if you are experimenting at this point, this isn't really much to worry about at the moment. For myself I tend to hold the git clone copy as my local origin, and then work on copy of this so I don't mess-up the origin copy. git clone https://github.com/JoesCat/fontforge ~/ff_local cp -pR ~/ff_local ~/ff1 <-(experimental copy ff1, or ffX) A piece of advice is if you plan on making edits and using git pull requests to push-back edits, then it is best to start a branch on your cloned copy and put your mods in the branch, and not in the master branch. cd ~/ff_local git -b checkout my_PCX_1 cd ~ cp -pR ~/ff_local ~/ff2 <-(experimental copy ff2) This allows you the flexibility to toss-out code that might not be to your liking, or to the main-line's, and if you had made the changes to your master branch, you would be stuck in a sort of limbo waiting for mainline to pull-in your pull-request, otherwise it messes-up your cloned branch. When you're satisfied with your edits... diff ~/ff_local ~/ff2 copy the edits back to ~/ff_local and test again to be sure you did okay cp -pR ~/ff_local ~/ff3 cd ~/ff3 ...build it to be sure it works, if no, fix further, if works ok, then push the branch to your "origin" cd ~/ff_local git push -u origin my_PCX_1 (you will be able to pull request the new my_PCX_1 branch on your webpage) If satified, then change your local copy back to master git checkout master These allow you to fetch "upstream" and merge with you copy. cd ~/ff_local git fetch upstream git merge upstream/master I'll assume you cloned fontforge/fontforge to your own github user page, therefore making your copy "origin" and the fontforge/fontforge "upstream" inside the git clone, you will find a config file in .git/config You can use a plain text editor to modify it (I use the KDE desktop, therefore use Kwrite...I'm guessing you may be using gnome, and probably default to gedit)...the references of most interest are "origin" and "upstream", and you will need to setup ssl if you plan to push-back to your origin page using the commandline. This is a short list giving you some idea of what the .git/config file looks like, which can/will be different for you. ....if url=git@ then it expects to use ssl, if it is url=http...then it's a pull-only branch This is a short list, but yours will have a different "origin" if you setup a github account and cloned fontforge to your webpage... [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = [hidden email]:JoesCat/fontforge.git [branch "master"] remote = origin merge = refs/heads/master [remote "upstream"] url = https://github.com/fontforge/fontforge.git fetch = +refs/heads/*:refs/remotes/upstream/* [remote "jtanx"] url = https://github.com/jtanx/fontforge.git fetch = +refs/heads/*:refs/remotes/jtanx/* [remote "monkeyiq"] url = https://github.com/monkeyiq/fontforge-fork fetch = +refs/heads/*:refs/remotes/monkeyiq/* A lot of the above is easier to handle with UI git tools. In KDE, this would be gitk ...I don't know what it is for Gnome, but suspect a similar name. At this point, if you are just experimenting, don't worry too much about the git system, but best to work on a copy of your ~/ff_local instead of messing-up/getting-it-dirty with all the extra files generated during ./bootstrap, configure, make. Another tool you may find handy, is grep for finding files holding key words. For example... cd ~/ff_local grep "\.gif" -R * more answered below On June 1, 2016 07:43:53 PM Martin B. Brilliant wrote: > Next step, configure, ran without any problems. The list of optional > libraries at the end showed that libgif and libreadline were missing. > QUESTION: after I install those libraries, can I include them by just > running bootstrap, configure, etc., from the beginning? In your search for missing libraries the first time around, a lot of it is now installed and not to worry about. ./bootstrap is a bit of a strange beast, which seems to import a bunch more stuff, but you won't need to worry about things like libtool,X, gif, tiff, etc now. configure is built using ./bootstrap, but it will find the optional libraries which you installed, such as libgif libtool, etc. > The make step also ran without trouble. I noticed as the messages flew > by that there were a lot of return values ignored. I’m sure at least > some of those return values should be used in the code to make sure > requested memory is actually allocated and that unallocated memory is > not addressed. Glad you noticed a lot of missing return values such as malloc, etc. There's a lot of potential fixes that can be done here. Pay some attention to "when" alloc and chunkalloc are used as they have some reasoning behind the two types of memory allocations, likewise realloc, free, chunkrealloc, chunkfree (a lot of realloc loses the earlier reference if it returns NULL, this needs TLC too). > Next: make install, ldconfig, and now FontForge is in the application > menu and starts up when its menu entry is clicked. I didn’t try to load > any fonts, just verified that it exists and can be invoked. If your plan is to experiment with creating a PCX import/export, I'd find a copy of monotone gif or bmp tiny pictures of a couple of letters to experiment with, or simply make a monotone 8x8 pixel copy using GIMP and save it as A.gif and another copy as A.pcx. This way, when you run fontforge, you only need to state it's a new font (therefore don't need to load one yet), then when fontforge is running, I'd select and empty font, say... "A", and then go import your 8x8 A.gif picture. To experiment in adding pcx, I'd start simple, by globbing-on your test code to an existing file structure, let's say, for example in: gutils/gimagereadgif.c looking at the gif file, maybe might be easier to start with gutils/gimagereadbmp.c by adding a secondary file-open to your A.bmp then close the file. add plenty of "I'm here" code to make your testing easier... looking at gutils/gimagereadbmp.c, you may note that the file name is opened in GImageReadBmp() and a file handle given to GImageRead_Bmp() which might not make much sense at first, but if you grep for "bmp" you'll find some stuff dealing with drag-n-drop, so the file-input-stream nature of GImageRead_Bmp() makes more sense why it's seperate from GImageReadBmp() ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by Joe
On 2016/06/01 8:25 AM, Jose Da Silva wrote: > I am unfamiliar with the MAC, but understand there is homebrew as a method > of install. This appeared to show at the top of the list (using homebrew): > https://www.davidlanier.com/blog/2012/1/how-to-install-fontforge-mac-os-x- > lion-homebrew > It is no longer possible build a graphical fontforge using Homebrew (one can only run scripts and use the fontforge python module). Moreover, it's extremely difficult to build on a system where some of the dependencies were built by Homebrew. In short, if you're normally a Homebrew user, it's nearly impossible (at least, I gave up after a day of trying) to build a useful FF on OS X. Which is a pity, because there are a bunch of bug fixes and small improvements I would have committed if only I could build FF to test it. --Max ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by Dave Crossland
Thanks, Dave, I have already considered editing the user docs, but I need step by step guidance.
I was able to compile and install FontForge from source because the posted documentation has step by step instructions: type this, go there, etc. I was able to use a different tool because I was familiar with that tool. When it comes to editing docs on Github, I can’t get anywhere, because I’m in unfamiliar territory and there are no maps.
-- Marty Martin B. Brilliant at home in Holmdel, NJ ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by Joe
On 02/06/16 09:43, Jose Da Silva wrote:
> For myself I tend to hold the git clone copy as my local origin, and then > work on copy of this so I don't mess-up the origin copy. I always just use `git reset --hard` to return to the original state if necessary. Regards, -- Matijs ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by Joe
On Jun 2, 2016, at 3:43 AM, Jose Da Silva <[hidden email]> wrote: > I'll assume you cloned fontforge/fontforge to your own github user page, > therefore making your copy "origin" and the fontforge/fontforge "upstream" Well, no, that’s not what I thought you said I should do. I don’t even know how to do that. You suggested that I start by installing from source. On Jun 1, 2016, at 2:25 AM, you wrote: > Pick-up the latest FontForge source: > https://github.com/fontforge/fontforge As far as I can tell, the “Clone or download” button on that page clones to my computer, not to my github user page (even when I’m logged in). The contributing page also goes there as the suggested first step. What I actually did was follow the instructions on the install page, which also cloned to my computer. So I guess my "original" source is your “upstream,” with no “original” of my own on github. I’ll have to look at the config file you pointed me to, but I can’t do that now. Do I need an original on my own github page in order to contribute? I’m still at sea without a compass, trying to find my way by reading the book at https://git-scm.com/book/en/v2. -- Marty Martin B. Brilliant at home in Holmdel, NJ ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
Martin B. Brilliant wrote:
> > I’m still at sea without a compass, You can download the entire thing as a zip file. The button is somewhere on the right side of the page, towards the top. Then you don't have to hassle with any of that mentally-retarded "git" crap. ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
Given the context of wanting to be able to experiment with different code changes and possibly in the future to submit pull requests, I would still recommend learning to use git in this case. On Fri, Jun 3, 2016 at 8:10 PM, jb <[hidden email]> wrote: Martin B. Brilliant wrote: ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by marty39
On June 3, 2016 03:48:14 PM you wrote:
> On Jun 2, 2016, at 3:43 AM, Jose Da Silva <[hidden email]> wrote: > > I'll assume you cloned fontforge/fontforge to your own github user > > page, therefore making your copy "origin" and the fontforge/fontforge > > "upstream" > > Well, no, that’s not what I thought you said I should do. I don’t even know how to do that. You suggested that I start by installing from source. Sorry about that - I misunderstood what you wrote. Not a problem. It's all about the code - not about the tools used - hehehe. so...yes, install the source. compile the code, install to your computer. Add some edits that you can see and verify later, recompile, and see if your newly modified fontforge compiled/installed with your new edits... For example, create yourself an 8x8 monotone pixel drawing of the letter A, and save it as a.bmp, and resave it as a.pcx in file gutils/gimagereadbmp.c, go to the last routine and modify it: GImage *GImageReadBmp(char *filename) { /* Import a BMP image, else cleanup and return NULL if error found */ FILE *file, filepcx; /* source file */ GImage *ret; if ( (file=fopen(filename,"rb"))==NULL ) { fprintf(stderr,"Can't open \"%s\"\n", filename); return( NULL ); } if ( (filepcx=fopen("~/a.pcx","rb"))==NULL ) { fprintf(stderr,"Can't open a.pcx\n"); fclose(file); return( NULL ); } else { fprintf(stderr,"found and opened a.pcx\n"); fclose(filepcx); fprintf(stderr,"now closed a.pcx\n"); } ret = GImageRead_Bmp(file); fclose(file); return( ret ); } then restart the modified fontforge, new font, open a character window and go "import" file a.bmp (I have not tested the code above, but assume it should also open, then close a.pcx if a.pcx is in the ~/ directory. As mentioned earlier - satisfy yourself that you can compile the code, then the next step is tinkering with the code to make it better. Your understanding of C, plus the fact you worked on something complex like accounting software, I'm guessing you'll find some stuff easy to understand. and the easiest way to understand is to experiment around with something like a branch, and not the trunk....which was why I suggested something like try...adding pcx read/write capability. You'll also note some routines in directory gutils are monotone, but there are a couple with potential for color or layers. I'd suggest try getting monotone working first, but also leave yourself some room to think of the possibility of adding colors or layers..... ...in future. > On Jun 1, 2016, at 2:25 AM, you wrote: > > Pick-up the latest FontForge source: > > https://github.com/fontforge/fontforge > > As far as I can tell, the “Clone or download” button on that page clones > to my computer, not to my github user page (even when I’m logged in). > The contributing page also goes there as the suggested first step. What > I actually did was follow the instructions on the install page, which > also cloned to my computer. > > So I guess my "original" source is your “upstream,” with no “original” > of my own on github. I’ll have to look at the config file you pointed > me to, but I can’t do that now. Sorry about bringing up confusion - just keep it simple, and we'll leave git and github for another day. ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
In reply to this post by Max Rabkin-2
On June 2, 2016 02:39:13 AM Max Rabkin wrote:
> On 2016/06/01 8:25 AM, Jose Da Silva wrote: > > I am unfamiliar with the MAC, but understand there is homebrew as a > > method of install. This appeared to show at the top of the list > > (using homebrew): > > https://www.davidlanier.com/blog/2012/1/how-to-install-fontforge-mac- > > os-x- lion-homebrew > > It is no longer possible build a graphical fontforge using Homebrew (one > can only run scripts and use the fontforge python module). I'd be only guessing this has to do with X, or the lack of X and maybe GTK on the MAC. > Moreover, > it's extremely difficult to build on a system where some of the > dependencies were built by Homebrew. In short, if you're normally a > Homebrew user, it's nearly impossible (at least, I gave up after a day > of trying) to build a useful FF on OS X. Which is a pity, because there > are a bunch of bug fixes and small improvements I would have committed > if only I could build FF to test it. I noted that there were some issues with BSD building libspiro, and some of the added patches were based on feedback from BSD. The last tagged release can't run the tests, but I suspect HEAD should work okay now (on BSD, and therefore likely as well on MAC). Can you check if libspiro HEAD compiles on homebrew (this is less complex make with a better probability of completing). Can you do a make check, or make test (this verifies that we'll need to import the time structure into fontforge, since BSD was not happy with 20150702 testing). if you attempted to build fontforge, will './configure' report that it found libspiro or libuninameslist ? if no, we'd likely need to add similar patching into "configure.ac" like: https://github.com/fontforge/libspiro/commit/b2b930a5b554480555d3226100bf45bd798e81a9 ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ fontforge-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/fontforge-devel http://fontforge.10959.n7.nabble.com/Developer-f3.html |
Free forum by Nabble | Edit this page |