Thursday, September 26, 2013

The End

The Google Summer of Code 2013 is over. And this is great opportunity to summaries what is done and working and what still waits to be implemented in LaTeX interpreter.

New interpreters skeleton

As part of my project I made a new abstract class named base_text_render. This class presents the core functionality of every interpreter when using 'fltk' graphics toolkit. There is an text_render working as top wrapper pointing to one of three interpreters. User can directly pick ft_render or latex_render class. And if there is no necessary library to use the render user picked he will be pointed to dummy_render class, which can't do nothing basically. It's here just to prevent breaking of the program. Here is picture visualizing the class inheritance.

*- Class inheritance picture -*

User can also use 'tex' interpreter, this choice will point him to ft_render class. But instead of using freetype characters it will be using characters defined withing tex symbols. 

Implemented functionality

At the end of this Summer of Code there is core functionality within LaTeX interrpeter. It can be used only for on-screen rendering. Users can use following text properties
  • background color - can't be used directly as text property, but users can use it as the LaTeX command \colorbox{declared-color}{Text}
  • color - can be used within text properties as color parameter and directly in LaTeX as the command \textcolor{declared-color}{Text}
Users can use all color commands that LaTeX accept within package color.
  • fontangle - can't be used as the text property, just directly withing commands, \textit{Text} for 'italic', \textsl{Text} for 'oblique' text
  • fontname - can be used directly in Octave, but when using LaTeX interpreter acceptable fonts are only the Latex fonts
  • fontsize - can be used directly
  • fontweight - can be used from just as Latex commands, \textbf{Text} for the 'bold' font and \textmd{Text} 'demi'.
  • rotation - users can rotate text for 0, 90, 180 and 270 degrees.
  • horizontalalignment - acceptable is 'left', 'right' and 'center' as default alignment.
  • verticalalignment - users can use 'middle', 'top', 'baseline', 'cap' and 'bottom' as default.
NOTE: Default state of parameter are for the title, for other text object they can be different.

All this is tested on Ubuntu 13.04 and it's working nicely and quite fast. Maybe a bit slower then when using ft_render. But the difference is tested and it present 10 - 50 mili seconds. This can be closer to upper number when using Octave with GUI. I'm quite confident that it will work same on all Linux based platforms. With some difference in speed, depending on how good is the hardware.

Things that could/should be done

It should be tested (it have been already and the test fails, so when my private obligations let me loose, I will try to fix it) on the Windows. After that normally on the some Mac system.

The already working on screen rendering could be upgraded with some new functionality that already exist in the ft_render class. Let say lineheight property and better multi line rendering. 

As the part of project, after start of coding my mentor sugested to implement this interpreter on the printing side too. But the time to do this didn't left, so for now it's on hold. Maybe there are another things that can be done, but as the author on this project I don't see them now.

P.S: All files that I touched and they are relevant for this interpreter are txt-render.h/.cc ; latex-render.h/.cc ; txt-eng-ft.h/.cc and graphics.cc . My online repository is here: http://inversethought.com/hg/octave-lojdl

No comments:

Post a Comment