FTCoreText icon indicating copy to clipboard operation
FTCoreText copied to clipboard

allow different bullet tags

Open algal opened this issue 13 years ago • 2 comments

There's one default tag for bullets -- <_bullet>.

But I might want different kinds of bullet styles, which would require being able to define custom bullet tags. I could now workaround this by giving <_bullet> a different style in different FTCoreTextViews, but then I would not be able to mix different bullet styles in one view.

algal avatar Feb 15 '12 00:02 algal

We are planning to redefine the style object to hold information about the kind of style they represent. With this change you would be able to call a _bullet as you wish and therefor have more and different styles for it. Unfortunately we are pretty busy at the moment so there is not a scheduled date for it. If you are willing to collaborate I can maybe point out some explanation on how to achieve this.

cescofry avatar Feb 15 '12 00:02 cescofry

Hi Francesco,

I submitted two issues because I suspect these are two separate matters -- (1) custom bullet tags (which would allow diverse bullets in one view), and (2) "blockquote"-like indentation of text associated with bullet item text.

(Maybe there is actually a third, (3) bullet glyph styles distinct from bullet item text styles.)

The second issue is the most important to me. One way or another I need to get this effect. I'd be glad to do this by adding the capacity to FTCoreText, but I think I would need some pointers from you on your codebase so I could do it efficiently.

Right now, I'm guessing the CoreText way would be to set different values for the kCTParagraphStyleSpecifierFirstLineHeadIndent and kCTParagraphStyleSpecifierHeadIndent paragraph style specifiers. I notice that FTCoreText doesn't expose the distinction between these right now (lines 833-834).

Another alternative would be to use CoreText's tab functionality, but I'm not too familiar with it. I can see that FTCoreText is configuring it around lines 862-890.

What I like about FTCoreText is that it seems like a relatively thin wrapper around CoreText. So I'd hope this functionality could be added in a way that's natural.

Alexis

On Feb 15, 2012, at 00:25, Francesco wrote:

We are planning to redefine the style object to hold information about the kind of style they represent. With this change you would be able to call a _bullet as you wish and therefor have more and different styles for it. Unfortunately we are pretty busy at the moment so there is not a scheduled date for it. If you are willing to collaborate I can maybe point out some explanation on how to achieve this.


Reply to this email directly or view it on GitHub: https://github.com/FuerteInternational/FTCoreText/issues/5#issuecomment-3972763

algal avatar Feb 15 '12 01:02 algal