Difference between revisions of "Mac OS X Porting - Native Fonts"

From Apache OpenOffice Wiki
Jump to: navigation, search
Line 40: Line 40:
 
lines or even the entire layout.  The text layout contains informations about lines and layout attributes, including justification, rotation, etc
 
lines or even the entire layout.  The text layout contains informations about lines and layout attributes, including justification, rotation, etc
  
'''CarretPosition''': [FIXME]
+
'''CarretPosition''': Caret is the name for the symbol '''^'''
  
 
'''Point''': [FIXME]
 
'''Point''': [FIXME]

Revision as of 20:05, 1 June 2006

First contact with Herbert Duerr (hdu), about fonts :

Choosen answers to start :

"...I already started an ATSUI port long ago. See issue 23283 for details (http://www.openoffice.org/issues/show_bug.cgi?id=23283). This patch is very old and worked for some simple situations..."

"..Everything is in VCL, especially the vcl/inc/sallayout.hxx header file is important. vcl/*/gdi/ subdirectories might be interesting too.

The SalLayout base class is the core of all VCL-text. It corresponds to an ATSUTextLayout object on ATSUI. All text display, measurements, text breaking, glyph fallback etc. are done via SalLayout objects.."

"..I think the best way is to deeply understand a SalLayout object is to get to know the very old VCL OutputDevice text related methods, and especially what the pDXArray parameter in them means. Then learn ATSUI, Uniscribe, ICU's layout engine and Java's TextLayout really well. A SalLayout is just the abstracted combination of all these layout engines. A SalLayout object has the "old pDXArray flavour" to keep the changes required by the rest of OOo minimal.."

"..Well, changing anything in the VCL text core is very hard, because it impacts basically everything text related in OOo. Since a simple change there can easily break some use cases, several scripts, platforms and may have a bad performance impact, I'd rather not change anything in the core...

"...If it is possible to isolate it to just the file salatslayout.cxx provided in issue 23283 then I'm all for it.."

Fixme : documentation starting point :

interesting documents about design of fonts implementations in OpenOffice.org  :

http://gsl.openoffice.org/files/documents/16/1890/OOo_Glossary_Of_Font_Terms.htm

Font management concept : http://gsl.openoffice.org/files/documents/16/1603/vcl_new_fontmanagement.pdf

window class hierarchy :

http://gsl.openoffice.org/files/documents/16/974/VCLClassHierarchyWindows.sxd

LEXICAL

Impl prefix means "Implementation detail", and such variable, functions ...etc will only be visible locally

ATS : Apple Type Services. This server works if an only if a CFRunLoop( ) is running, and launched in main thread.

Sal : System Abstraction Layer

Layout (for text layout) : Text Layout contains one ore more paragraphs of text together with style attributes that may apply to character,

lines or even the entire layout. The text layout contains informations about lines and layout attributes, including justification, rotation, etc

CarretPosition: Caret is the name for the symbol ^

Point: [FIXME]

Glyph: [FIXME]

Style: [FIXME]

Offset: [FIXME]

Boundary: [FIXME]

GIA: Glyph Information Attributes

Character style information: is contained in a style object associated ( not contained by ! ) a text layout object.


SalLayout base class description

[FIXME]

salatslayout.cxx description

sal : means System Abstraction Layer

ats : Apple Type Server native font server

ATSUI : Apple Type Server for Unicode Imagery

layout : for the asbtraction

deprecated functions in Carbon API

ATSUCreateTextLayoutWithTextHandle  
ATSUSetTextHandleLocation   
ATSUSetFontFallbacks   
ATSUGetFontFallbacks  
ATSUFONDtoFontID  
ATSUFontIDtoFOND  
ATSUGetGlyphInfo  
ATSUDrawGlyphInfo  
ATSUIdle  

Content description : salatslayout.cxx

URL's & important LINKS

sallayout.hxx description

See : http://wiki.services.openoffice.org/wiki/Sallayout.hxx

Unicode references in Wikipedia

English reference : http://en.wikipedia.org/wiki/Unicode

French reference : http://fr.wikipedia.org/wiki/Unicode

ICU references in Wikipedia

English reference : http://en.wikipedia.org/wiki/International_Components_for_Unicode

French reference : http://fr.wikipedia.org/wiki/International_Components_for_Unicode

Apple documentation

ATS and ATSUI starting point : http://developer.apple.com/documentation/Carbon/Conceptual/ATS_Concepts/atsfonts_intro/chapter_1_section_1.html Apple's starting page leading to deeper docs: http://developer.apple.com/documentation/TextFonts/Typography-date.html

New Font Management

[FIXME]

See Herbert's Duerr document : http://www.openoffice.org/files/documents/16/1603/vcl_new_fontmanagement.pdf

This work is part of http://wiki.services.openoffice.org/wiki/Mac_OS_X_Porting_-_Work_Areas/Todo%27s

( Ericb 14:37, 21 May 2006 (CEST) )

Personal tools