Welcome to FEdit 1.4! ===================== FEdit is a small and nice visual editor for the MGRX own font format. It runs in all plarforms supported by the MGRX Graphics Library. FEdit installation instructions =============================== Requirements: ------------- The source files: fedit14.zip This document: readme.txt Dependencies: ------------- Before compiling FEdit you must have MGRX instaled in your system, at least in his version 1.4.0. Go to www.fgrim.com/mgrx for instructions. A. Unpacking the FEdit archive ------------------------------ 1) 'cd' to a directory where you want the FEdit file tree to be created as a subdirectory. Examples are: DJGPP : C:\MYPROGS Mingw : C:\MYPROGS Linux : ~/myprogs 2) Unpack the FEdit archive: unzip fedit14.zip This will create the subdirectory 'fedit14'. B. Compiling FEdit ------------------ 1) Go to the "fedit14" directory 2) run 'make -f ': makefile.dj2 for DOS/DJGPPv2 makefile.w32 for Win32/Mingw makefile.lnx for Linux/framebuffer makefile.x11 for Linux/X11 This process generates the "fedit" executable ("xfedit" for the X11 version) and the two utility programs getright and putright. Note for DJGPP/Mingw users: Do _not_ use an environment variable `SHELL' leading to `bash', e.g. `SHELL=/djgpp/bin/bash.exe'. Do not use MSYS either. The DJGPP/Mingw Makefiles must be run with the normal 'command.com'. Note for Mingw users: use "mingw32-make" instead "make". The compilation was tested with the 32 bit version of "TDM-GCC" mingw32 distribution. Runing FEdit ============ To faciltate first tests some MGRX fonts have been included in the "fonts" subdirectory. If you want, you can copy all the fonts that come with the MGRX distribution to this subdir, to work with them without breaking anything. Run FEdit using this command (use "xfedit" for the X11 version): "fedit [--gm width height bpp] [--mx maxglyphs] [--nodb] [fontname]" "--gm width height bpp" are optional parameters to set the desired graphic resolution (default 1200 800 8). Note that the graphics drive will set the nearest possible resolution to the desired one. Note that in X11 and W32 you can resize the window at any moment draqing the window borders to fit your needs. "--mx maxglyphs" sets the maxglyphs parameter (default 1024). Note, sets this parameter to 65536 if you want to edit a unicode font. "--nodb" doesn't use double buffer for graphics. By default a double buffer is used, this producess always smoother graphics, but it can be slower or faster depending of the videodriver. "fontname" must be the name of a .fnt file or any font name that MGRXlib can read and convert to his own .fnt format (by example in X11 you can use a system font like: "-adobe-courier-bold-r-normal--34-240-100-100-m-200-iso8859-1"). FEdit first try to open the named file directly as a font file in the MGRX own format, if it exists it will also load the license text (if any) and set the outputfilename to the same inputfilename string. If that fail it will try to use the MGRXlib lookup to load the font and set the outputfilename to "output.fnt". Examples: fedit fonts/pc8x16.fnt fedit fonts/ncen40b.fnt --gm 8000 8000 32 (this goes fullscreen) Note that with the X11 and W32 versions you can resize the FEdit window at runtime. Using FEdit =========== Obviusly some knowledge about fonts and specifically about MGRX fonts is needed, but I expect the use of FEdit will be intuitive. After loading the font you will see a menu bar and two main panels. Note that only one of them has the focus (the one with a yellow border). Use F8 or click the mouse in a panel to change the focus. The left panel, with space for 1024 glyphs by default (it can be changed with the --mx parameter), will be loaded with the font glyphs, wich number will be probably smaller, you can use the rest of glyph space like a work area (or to make a font with more glyphs of course). You can select one glyph using the cursor Keys or the mouse, hit Return or the rigth mouse button to show a context menu and load or paste the glyph from the right panel. The right panel is a zoomed dot matrix showing the glyph pixels where you can edit them. To navigate and changing pixels either use the cursor and Return keys or click with the left mouse button. For proportional fonts note that there is a yellow vertical line (the glyph width) that you can move left or right. You can change any pixel but only pixels left to the vertical line will be saved when you paste the glyph. The FLRange is a generic concept of First and Last glyphs range that is used by some batch operations under the Glyph menu, you can set the first glyph selecting it and pressing Ctrl+A and the last one pressing Ctrl+B. Explore the menu bar for the different options avaliable. We only explain here some of the less obvios characteristics. "Load Font" load a new font dismissing the actual one, using the same procedure explained above. "Save Font" will let you save the font file, use "Edit Font properties" to change font properties and "Edit Font license" to change the font text license first. From version 1.4 FEdit can generate sparse proportional fonts, setting the width of not defined glyphs to zero and no generating any bitmap for that glyphs. Note that this can only be done for proportional fonts because the fixed ones do not have width glyph table, but you can set a really fixed one as a proportional one, and even unicode fixed fonts must to be proportional because can have lot of glyphs with double width. Note that the MGRX 1.4.0 version is nedeed to be able to load sparse fonts. "Append glyphs from Font" load a glyph range from a different font into the font being edited. It is not necesary that both fonts have the same box dimensions, the program copy as much as it can. The parameters X and Y origin defines the point where the top-left point of the loaded glyph will be draw. "Convert to fixed Font" convert a proportional font to fixed. All witdh glyphs will be changed to maxwidth and centered. "Convert to prop. Font" do the oposite, but it only sets the font as proportional without moving the glyphs, if desired you need adjust each glyph by hand. "Resize Font box" only resize the box, not the glyphs. A dialog will let you adjust each border box in a positive (expand) or negative (shrink) amount. You can use this option to move all glyphs at once, by example adding +1 to the left border and -1 to the right border you move all the glyphs 1 pixel to the right. "Resize Font" really resize the font, but only for the glyphs in the font range. Results can vary depending of the relation between the old font box and the new one. Note that you must supply the new mean width, no the new max width. The "Load Font from Hershey data" option generates a MGRX font from a Hershey vector font. A dialog appears to define the parameters for the conversion. A complete set of the Hershey vector fonts is distributed with FEdit. See the readme.txt file int the "hershey" subdirectory for more information. In doubt you can ask me or read the source. getright & putright =================== The .fnt format doesn't carry license information, but it can be added at the end of the file and showed by example with the "strings" command. Indeed most of the fonts that comes with MGRX have license info in this way. Besides the capabilities of FEdit to edit the license information, there are two utiliy programs, getright & putright, that can get or put license information from/at the end of the font file. Usage: getright fontname [> rightsfile] putright fontname rightsfile Note that putright erases any previous copyright information. License ======= FEdit is free software, you can redistribute and/or modify it under the GPLv3 license. See the "LICENSE" file for details. Enjoy, M.Alvarez