> > Calculating pixels would be more difficult, but not impossible.  You
> > can't just count characters, though -- you'd have to read the
characters
> > and calculate their total length (using a file that the admin user
> > supplies, containing characters and their pixel lengths).  So doing
it
> > based on pixels is possible but rather more involved.
> >
> > Samuel
> 
> Well, for Latin based languages I guess this might work, but will be a
> humongous amount of work. Think about the effect of ligatures, for
> example. This all depends on the font and the rendering engine that
will
> be used eventually.  For Arabic and Indic languages - well, let's just
> say it gets "interesting" with joining, stacked vowels and reordering.
> Pango does this of course. But it is definitely not trivial. One would
> need to understand the requirements and the operating environment very
> well. To emulate this is mostly pointless, I'd say - it is necessary
to
> use the actual environment to be sure.

Hi Friedel - 

Thanks for wading in.  I see your point.  All of the embedded systems
that I've been involved with use pre-rendered bitmaps of the fonts that
they intend to use.  

I know that there are some embedded systems out there that have the
horsepower to use generalized truetype fonts that can render in any
size, italics, bold, etc.  However, I think that for most deeply
embedded systems, taking a truetype or other general font and rendering
it in the size needed in a font cache and then using the newly rendered
font to put the text up on the screen is way too compute intensive.  I'm
talking about systems being developed today using 75MHz PowerPCs.
Memory is cheap; processing power is not so cheap.  

So, when the software sizes up fields during GUI construction, it just
takes the string and runs it through the desired pre-rendered font as if
it was drawing the string on the screen and calculates the max height
and sums the character widths.

I can see that what I'm asking for may not be available in a general
solution.

And I do thank you for bringing up the point that my western-centric
head failed to recognize regarding different languages and how the
various characters are constructed and the fact that not all languages
"run" in the same direction.  That's a great big Homer Simpson "Doh!"
for me! :)

Paul

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Translate-pootle mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/translate-pootle

Reply via email to