NOTE: This section is not complete. These are just rough notes.
The Font Editor is present in stock VARKON, but its access through the menu system is commented out. Here's how I enabled it using the English menus (thanks to Dr. Kjellander for his advice on this).
cd $VARKON_ROOT/mdf/english
Edit "menus.INC"
To enable the font editor menu, go to "m23" ("TEXT") and uncomment the "font-editor" line. Change the position of the menu's closing semicolon as well. So this original (VARKON 1.17D):
m23 = "TEXT" "left",f50 "right",M113 "centre ",M114 "2 positions",M115; ! "font-editor",m93;
becomes this:
m23 = "TEXT" "left",f50 "right",M113 "centre ",M114 "2 positions",M115 "font-editor",m93;
The Font Editor menu itself is "m93".
m93 = "FONT_EDITOR" "template",p176 "points ",f20 "draw",M177 "move",p178 "genererate file",m94;
Button "template" calls a module named by t-string "176" This t-string is defined in "texts.INC as "fe_mall", which is the template-creating MBS function in the font editor sources.
The font related t-strings from "texts.INC" are:
t176 = "fe_mall" t177 = "fe_drawm" t178 = "fe_move" t179 = "fe_tknfil" t180 = "fe_fntfil"
Going back to the FONT_EDITOR menu, the "points" button calls built-in function number 20. The functions are listed in the VARKON Documentation -> VARKON User's Manual -> Interactive Functions. f20 is "2D Create Point" (it corresponds to MBS poi_free()).
The "draw" button calls an MBS Macro named by t-string "177", which is (see above) "fe_drawm".
The "move" button calls the MBS function named by t-string "178". This is "fe_move", one of the font editor MBS functions.
Finally (for this menu) the "generate file" button chains to menu "m94". This menu contains:
m94 = "GENERERATE FILE" "this char",M179 "all char",M180;
Menu "m94" has two buttons which invoke MACRO modules identified by t-strings "179" and 180". These are (see above) defined in "texts.INC" as "fe_tknfil" and "fe_fntfil".
Note: This is just one way to do it.
I created a project "font", with an active module "main".
Main Menu 2D -> Create -> Text -> Font Editor -> Template
VARKON will prompt for the ASCII value of the character, and for the string value of the character itself. A font template will then appear.
The Active Module now contains:
BASIC DRAWING MODULE main(); BEGINMODULE part(#1,fe_mall(49, "1")); ENDMODULE
Where "49" is the ASCII value of the character I chose and "1" happens to be its text.
So MBS function fe_mall is the template function.
The font editor function sources are in "$VARKON_ROOT/sources/Vlib/fonts/fedit". They are:
fe_draw.MBS fe_drawm.MBS Macro to draw a line fe_fntfil.MBS write out an entire font fe_mall.MBS template generator fe_move.MBS fe_tknfil.MBS write out a single character jkc.SOV
When the editor is invoked, a file is also created in the job directory called "fedit.ONR" which holds the "ordningsnummer" This file initially contains "1 "
To draw a line, first enter two points
MAIN_MENU_2D -> Create -> Text -> Font Editor -> Point -> Absolute
enter the coordinates; I'll use (1000,1000) here You can now go back and view/edit the MBS, which contains:
part(#1,fe_mall(49, "1")); poi_free(#2,vec(1000, 1000));
Enter another coordinate (I did this in MBS):
part(#1,fe_mall(49, "1")); poi_free(#2,vec(1000, 1000)); poi_free(#3,vec(9000, 1000));
The point (pun intended) to make is that the Font Editor menu item "template" just calls the MBS function "fe_mall", and the button "points" just calls the built-in point drawing function (f20) which is the same as the MBS function "poi_free" The VARKON "Font Editor" is not some special editing program; it's just a regular VARKON drawing session.
More later...
The fragments VARKON code and of the VARKON user interface are a part of VARKON and thus bear their VARKON copyrights and are licensed under the GNU General Public License. The VARKON source code is publicly available at http://www.tech.oru.se/cad/varkon/
The rest of this document is copyright © 2003 by David M. MacMillan.
Permission is granted to copy, distribute and/or modify copyrighted portions of this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License."
Note: Those portions of this document which are in the public domain, if any, may be copied freely. The distribution of these public domain portions is subject to all of the disclaimers of warranty and liability noted herein.
This work is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Free Documentation License for more details.
You should have received a copy of the GNU Free Documentation License along with this work; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
This work is distributed "as-is," without any warranty of any kind, expressed or implied; without even the implied warranty of merchantability or fitness for a particular purpose.
In no event will the author(s), editor(s), or publisher(s) of this work be liable to you or to any other party for damages, including but not limited to any general, special, incidental or consequential damages arising out of your use of or inability to use this work or the information contained in it, even if you have been advised of the possibility of such damages.
In no event will the author(s), editor(s), or publisher(s) of this work be liable to you or to any other party for any injury, death, disfigurement, or other personal damage arising out of your use of or inability to use this work or the information contained in it, even if you have been advised of the possibility of such injury, death, disfigurement, or other personal damage.
GNU is a registered trademark of the Free Software Foundation.
VARKON is or was a trademark of Microform AB (Sweden).
Forward to The VARKON Font Format
Version 0.0