[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] TeXmacs source prerequisites
From: |
David Allouche |
Subject: |
Re: [Texmacs-dev] TeXmacs source prerequisites |
Date: |
Thu, 19 Jun 2003 10:39:21 +0200 |
User-agent: |
Mutt/1.5.4i |
On Wed, Jun 18, 2003 at 11:52:05PM -0700, Salman Khilji wrote:
>
> I'd like to know what should be considered as prerequisites before a
> developer tries to understand/maintain/modify/enhance TeXmacs. I am
> talking about the kind of developer that has at least some sort of
> understanding about every asepct of TeXmacs and could possible say
> port TeXmacs to using Qt or GTK library. Or perhaps I am talking
> about Joris---everything that he had to learn before he started the
> project.
As you pointed out you need C++. Mostly the basics: classes, simple
inheritance, simple templates.
You need not know anything about the STL or other standard libraries
since TeXmacs implements its own fundation classes.
If you are aiming at a global understanding of the whole mess, Scheme
is also a prerequiste since a lot of the application logic (and more
in the future) is written in Scheme. Important parts currently include
the keymaps and menu definitions, a lot of GUI and editor policy, the
plugins and some conversion filters.
Depending on what you want to do, you might not need it at all. At the
moment, I think it may be possible to port texmacs to a new GUI
toolkit without touching the scheme code at all. Still, it is a good
idea to know the basics of Scheme (things like cons lists or sexps)
because it is likely to help you understand a lot of the C++ code.
> According to TeXmacs WiKi "TeXmacs dependancy on TeX is limited to fonts,
> font
> rendering and BibTeX". Considering that I have never done "font rendering",
> I would consider this as a prerequisite. I studied:
>
> http://freetype.sourceforge.net/freetype2/docs/glyphs/index.html
Nice link. I would have to read it sometime.
> I went thru the above link to gain an understanding of what kinda of issues
> are involved in font rendering. So is there any documentation that I could
> read that explains TeX fonts in detail? FreeType does not seem to address
> TeX fonts. Where is the screen font rendering code in the source? I'd like
> to go through it and see how such beautiful rendering is implemented.
Font rendering is handled in two steps:
1. Ask METAFONT to rasterize a font, then load the rasterized font
file (.pk).
It is important to understant that TeX fonts are fundamentally a
different technology than PostScript/TrueType fonts. TeX fonts
are brush-and-stroke based while TrueType fond are outline based.
If you are interested in METAFONT, you should dig in the Don
Knuth's litterature. Ther should be a "METAFONT Book" available
near you.
Check for source code in src/Resources/Fonts and
src/Resources/Tex.
2. Automatically hint the character bitmaps for the current
shrinking factor in order to provide.
The magic is done in src/Resources/Bitmap_fonts/shrink.cc.
It is very likely that FreeType have better/faster/smarter hint
and display features, but texmacs hinting generally does a decent
job.
> Again, from TeXmacs Wiki, "MetaPost was a pain to implement (Joris' words)".
> Having not ever used MetaPost in the past, I got from the homepage that
> MetaPost is some sort of graphics language. To me it seems like MetaPost is
> implemented in TeXmacs (although I don't see anywhere it could have been used
> since TeXmacs does not do graphics). So is MetaPost a prerequisite.
Weird quote (from Alvaro)... there was some discussion on the mailing
list recently about how texmacs does not support MetaPOST... Or maybe
I misunderstood.
> Would anybody like to recommend a set of links and references that I can
> consult to gain a better understanding of the theory behind the design of
> TeXmacs.
The basics you have already: the developper mailing list and the
source code of texmacs.
As I said before, it would be a good thing to get familiar with Scheme
in order to better understand TeXmacs (even the C++ part). A good book
to start in Scheme is "The Structure and Interpretation of Computer
Programs". A html version is freely available.
Also, a very good book to read is "Design Patterns". It will present a
number of high-level constructs that will see in several places in
texmacs C++ code.
For the rest... well... read code, experiment and write code.
--
-- ddaa