Building and using varamozhi API in C

  • compile varamzhi
  • say you are compiling for kerala font, pick the files: lex.mozhi_kerala.c lex.macro_mozhi_kerala.c mozhi_kerala_default.c
    mal-type.h mal-decl.h
    compile them together to form the DLL in windows or .a file in unix. if it complains some functions are not found, search for them in the .c/.h files under varamozhi source directory. otherwise ask me; I can help.

  • Sometimes VC++ complains that fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limitlex.mozhi_kerala.c. This error is caused by Microsoft VC++ reaching its internal heap limit. To increase the heap limit:
    1. Go to Project > Settings...
    2. Choose the Linker tab
    3. Go to "Command line for building ... DLL"
    4. Insert /ZM400 just after the cl, (Note 400 indicates 400% more memory than the default allocated by MSVC) Then the command line box should read cl /ZM400 /LD... at the start
  • now use the the interface as shown in this file.

  • FONTAPI local macro is the function of interest. As an example: you would include mal_api.h and call the parser function as:
    char *malayalm_text =
    mozhi_kerala_parse(manglish_text, FL_DEFAULT);


Post a Comment

<< Home