The multi-phase drawing feature has now been committed. There is a new API SCI_SETPHASESDRAW which accepts 3 values, SC_PHASES_ONE(0), SC_PHASES_TWO(1), or SC_PHASES_MULTIPLE(2).
SC_PHASES_ONE is the original Scintilla behaviour where each run of text was drawn along with its background colour independently in its own distinct rectangle, and any text outside this rectangle may be cut off. Truncation was was common when the style included italics or the text was kerned. SC_PHASES_TWO is the two phase drawing scheme introduced to allow text to overlap into the next/previous run which ensured that portions of characters were not cut off horizontally.
SC_PHASES_MULTIPLE extends this to allowing a small amount of overlap vertically so that extreme ascenders and descenders have a good chance of not being cut off. While extreme ascenders and descenders may occur in any language depending on the font chosen, they are common for emoji and for some languages like Tibetan.
SC_PHASES_MULTIPLE may be slower than the other settings due to layout being calculated more times in the painting code. However this should be reduced to almost zero if layout caching is set to SC_CACHE_PAGE or higher.
There is a corresponding SCI_GETPHASESDRAW to retrieve this state. The previous SCI_SETTWOPHASEDRAW API has been superseded by SCI_SETPHASESDRAW although SCI_SETTWOPHASEDRAW still works for now. It may later be formally deprecated.
The emphasis in the API name is on the implementation mechanism and may be better expressed as the result of the setting: either text that may be cut off, may share space horizontally or may share space both horizontally and vertically.
This change perturbed quite a bit of code so there is a chance of new bugs.
SciTE adds a new phases.draw property that calls SCI_SETPHASESDRAW with its value.
Available from the Mercurial repositories:
hg clone http://hg.code.sf.net/p/scintilla/code scintilla
hg clone http://hg.code.sf.net/p/scintilla/scite
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firstname.lastname@example.org.
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/d/optout.