Path: utzoo!attcan!uunet!shelby!unix!mxmora From: mxmora@unix.SRI.COM (Matt Mora) Newsgroups: comp.sys.mac.programmer Subject: Re: The 'styl' resource Message-ID: <21791@unix.SRI.COM> Date: 1 Mar 91 17:25:35 GMT References: <3732.27CD8EBC@blkcat.fidonet.org> Reply-To: mxmora@unix.sri.com (Matt Mora) Organization: SRI International, Menlo Park, CA Lines: 66 In article <3732.27CD8EBC@blkcat.fidonet.org> Ken.Knight@f421.n109.z1.fidonet.org (Ken Knight) writes: In a previos post I forgot to anwser your last question. >these 'styl' resources? Just what is the format of a 'styl' resource? So here it goes: (this off the top of my head :-)) TEStyleHandle = ^TEStylePtr; TEStylePtr = ^TEStyleRec; TEStyleRec = RECORD nRuns: INTEGER; {number of style runs} nStyles: INTEGER; {size of style table} styleTab: STHandle; {handle to style table} lhTab: LHHandle; {handle to line-height table} teRefCon: LONGINT; {reserved for application use} nullStyle: nullSTH = ^LHTable; LHTable = ARRAY [0..0] OF LHElement; LHElement = RECORD lhHeight: INTEGER; {maximum height in line} lhAscent: INTEGER {maximum ascent in line} END; NullSTHandle = ^NullSTPtr; NullSTPtr = ^NullSTRec; NullSTRec = RECORD TEReserved: LONGINT; {reserved for future expansion} nullScrap: STScrpHandle {handle to scrap style table} END; TextStyle = RECORD tsFont: INTEGER; {font (family) number} tsFace: Style; {character style} tsSize: INTEGER; {size in points} tsColor: RGBColor {absolute (RGB) color} END; StScrpHandle = ^StScrpPtr; StScrpPtr = ^StScrpRec; StScrpRec = RECORD scrpNStyles: INTEGER; {number of distinct styles in scrap} scrpStyleTab: ScrpSTTable {table of styles for scrap} END; ScrpSTTable = ARRAY [0..0] OF scrpSTElement; ScrpSTElement = RECORD scrpStartChar: LONGINT; {offset to start of style} scrpHeight: INTEGER; {line height} scrpAscent: INTEGER; {font ascent} scrpFont: INTEGER; {font (family) number} scrpFace: Style; {character style} scrpSize: INTEGER; {size in points} scrpColor: RGBColor; {absolute (RGB) color} END; Pheew... Matt -- ___________________________________________________________ Matthew Mora | my Mac Matt_Mora@sri.com SRI International | my unix mxmora@unix.sri.com ___________________________________________________________