You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, the bullet tag defines one style that applies both to the bullet glyph and to the text associated with the bullet. For instance, font overrides bulletFont and color overrides bulletColor. After the following style, the bullet and the text are green and sixteen point:
It would be good if there could be two styles. Then you could use one font and colour for the bullet glyph (e.g., blue, Webdings) and the letter glyphs from another (e.g., black, Helvetica).
In addition, I may be wrong, but I think defining a separate style for the bullet text is necessary just to support the usual indentation of the non-initial lines of text associated with a list item, as it works for in HTML for instance. I'd be very interested in helping with this but I'm not sure where to start.
For instance, I am not sure how to use CoreText to produce this indentation style, or if what I've suggested is the approach that best fits the component's close fit to CoreText's own model
The text was updated successfully, but these errors were encountered:
My original comment here referred to two issues:
(1) separate style for the bullet character and for the bullet's text;
(2) bullet text indented according to the usual HTML "list style."
I still believe (1) is in fact a bug, given that the API defines bulletFont and bulletColor, presumably to distinguish it from the text font and text colour of the style, but then in my experiments one overrides the other.
However, as regards (2), I did some digging and realised you can already get this effect using FTCoreText by setting the left value of the paragraphInset to the desired BulletIndent distance. I have to admit I'm quite puzzled why this works.
From experimenting with CoreText directly, I find you can only produce the effect by setting three values (FirstLineHeadIndent=0, TabStop1=BulletIndent, and HeadIndent=BulletIndent) and then beginning the text like "\t". However, from examining the FTCoreText code, and logging the paragraph style with CFShow, I can see that the FTCoreText is only setting two of these values.
I suppose FTCoreText is doing something else, outside of the CTParagraphStyle, that affects layout.
Right now, the bullet tag defines one style that applies both to the bullet glyph and to the text associated with the bullet. For instance, font overrides bulletFont and color overrides bulletColor. After the following style, the bullet and the text are green and sixteen point:
It would be good if there could be two styles. Then you could use one font and colour for the bullet glyph (e.g., blue, Webdings) and the letter glyphs from another (e.g., black, Helvetica).
In addition, I may be wrong, but I think defining a separate style for the bullet text is necessary just to support the usual indentation of the non-initial lines of text associated with a list item, as it works for in HTML for instance. I'd be very interested in helping with this but I'm not sure where to start.
For instance, I am not sure how to use CoreText to produce this indentation style, or if what I've suggested is the approach that best fits the component's close fit to CoreText's own model
The text was updated successfully, but these errors were encountered: