Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Basic character set analyzer
Re: Basic character set analyzer [message #20005 is a reply to message #19997] Mon, 09 February 2009 08:47 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
cbpporter wrote on Sun, 08 February 2009 06:55

A little info about the second and final change I need to Draw.

I've added some fields to CharMetrics and some methods to FontInfo. These changes are ad-hoc hacks, and I really need a better integrated solution with proper names.
[code]struct CharMetrics : Moveable<CharMetrics> {
int width;
int lspc;
int rspc;
int y;
int height;
int x;
int ew;

bool operator==(const CharMetrics& b) const
{ return width == b.width && lspc == b.lspc && rspc == b.rspc; }



Not really happy about it -> it makes CharMetrics too long.

I think we should read this directly, not to cache this.

I think that, at the end, we should in fact cache 'direct translation'. At the heart of font system there should be a function like:

struct RenderGlyph {
    int chr;
    Font fnt;
    int aux_chr; // == 0 -> no aux glyph
    Font aux_fnt;
    int16 aux_x, aux_y;
};


RenderGlyph GetRenderGlyph(int chr, Font fnt);

and we should cache it at this phase. We can easily afford to cache tens of thousands of such pairs.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: GetNativeLangName returns English for non-english languages
Next Topic: Improvements to several Lang.cpp functions
Goto Forum:
  


Current Time: Fri Jun 20 15:46:37 CEST 2025

Total time taken to generate the page: 0.04192 seconds