Changes between Initial Version and Version 1 of CocoaIde/FontSupportImplementation


Ignore:
Timestamp:
06/21/09 05:13:20 (5 years ago)
Author:
rme
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CocoaIde/FontSupportImplementation

    v1 v1  
     1To implement character properties, the line structure is augmented with a charprops-changes slot. 
     2If all the characters on the line have default properties, this slot will contain NIL.  Otherwise, 
     3it will be an adjustable vector with a fill pointer which contains one or more charprops-change structures. 
     4 
     5A charprops-change structure contains an index, which is the character position at which the change takes 
     6effect, and a plist, which represents the properties of the run of characters following the index.  The properties are 
     7in effect until the index of the next charprops-change, or to the end of the line. 
     8 
     9The properties of the other lines do not affect a given line at all. 
     10 
     11A line always starts with the default character properties.  This means that the first change in 
     12a line's charprops-changes vector may not have an index of 0.  For instance, if the first 5 characters of 
     13a line had default properties, and the rest of the line was in bold, the charprops change vector would look 
     14like 
     15{{{ 
     16#(#S(HI::CHARPROPS-CHANGE :INDEX 5 :PLIST (:FONT-WEIGHT :BOLD))) 
     17}}} 
     18Note that the run of characters is implicit at the beginning.  This makes for some added complexity in 
     19the code that searches and manages the charprops-changes vector. 
     20