Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow different bullet tags #5

Open
algal opened this issue Feb 15, 2012 · 2 comments
Open

allow different bullet tags #5

algal opened this issue Feb 15, 2012 · 2 comments

Comments

@algal
Copy link
Contributor

algal commented Feb 15, 2012

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.

@cescofry
Copy link
Contributor

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.

@algal
Copy link
Contributor Author

algal commented Feb 15, 2012

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:
#5 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants