Giter Site home page Giter Site logo

Paragraph spacing about dtcoretext HOT 9 CLOSED

gshaviv avatar gshaviv commented on June 12, 2024
Paragraph spacing

from dtcoretext.

Comments (9)

odrobnik avatar odrobnik commented on June 12, 2024

Since there is no specific way to do that in HTML/CSS there is no way in DTCoreText either.

Von meinem iPhone gesendet

Am 12.12.2011 um 20:38 schrieb gshaviv [email protected]:

Is there a way to set the paragraph spacing? Seems like it's always using the line height of the previous paragraph which looks bad in some situations.


Reply to this email directly or view it on GitHub:
#92

from dtcoretext.

odrobnik avatar odrobnik commented on June 12, 2024

Should we use margin-bottom for this purpose?

from dtcoretext.

gshaviv avatar gshaviv commented on June 12, 2024

My thought was margin-top is likely better as you would probably more
likely to set to space before than the space after. Also seems easier to
implement.

Guy

On 19 בדצמ 2011, at 12:07, Oliver Drobnik <
[email protected]>
wrote:

Should we use margin-bottom for this purpose?


Reply to this email directly or view it on GitHub:
#92 (comment)

from dtcoretext.

odrobnik avatar odrobnik commented on June 12, 2024

CoreText has a paragraphSpacing and a paragraphSpacingBefore paragraph style attribute. I'm thinking we could map these accordingly relatively easily

Von meinem iPhone gesendet

Am 19.12.2011 um 11:09 schrieb gshaviv [email protected]:

My thought was margin-top is likely better as you would probably more
likely to set to space before than the space after. Also seems easier to
implement.

Guy

On 19 בדצמ 2011, at 12:07, Oliver Drobnik <
[email protected]>
wrote:

Should we use margin-bottom for this purpose?


Reply to this email directly or view it on GitHub:
#92 (comment)


Reply to this email directly or view it on GitHub:
#92 (comment)

from dtcoretext.

gshaviv avatar gshaviv commented on June 12, 2024

On my branch I added a global option for paragraph spacing that maps
to the CoreText property. Was easier than changing the style and
suited what I needed, but doing it in the style is more general and
hence better.

Guy

On 19 בדצמ 2011, at 12:16, Oliver Drobnik
[email protected]
wrote:

CoreText has a paragraphSpacing and a paragraphSpacingBefore paragraph style attribute. I'm thinking we could map these accordingly relatively easily

Von meinem iPhone gesendet

Am 19.12.2011 um 11:09 schrieb gshaviv [email protected]:

My thought was margin-top is likely better as you would probably more
likely to set to space before than the space after. Also seems easier to
implement.

Guy

On 19 בדצמ 2011, at 12:07, Oliver Drobnik <
[email protected]>
wrote:

Should we use margin-bottom for this purpose?


Reply to this email directly or view it on GitHub:
#92 (comment)


Reply to this email directly or view it on GitHub:
#92 (comment)


Reply to this email directly or view it on GitHub:
#92 (comment)

from dtcoretext.

lucare avatar lucare commented on June 12, 2024

Hi Guy,

Your approach sounds exactly like it want to do. Can you share what changes you made to get the paragraph spacing working? Or point me in the right direction in terms of which file and function that I need to modify.

Thanks,
Bill

from dtcoretext.

odrobnik avatar odrobnik commented on June 12, 2024

It's already inplemented!

Von meinem iPhone gesendet

Am 01.01.2012 um 22:03 schrieb lucare [email protected]:

Hi Guy,

Your approach sounds exactly like it want to do. Can you share what changes you made to get the paragraph spacing working? Or point me in the right direction in terms of which file and function that I need to modify.

Thanks,
Bill


Reply to this email directly or view it on GitHub:
#92 (comment)

from dtcoretext.

gshaviv avatar gshaviv commented on June 12, 2024

Bill,

My fork is on GitHub, feel free to use it, or just use the changes for paragraph spacing. The fork link is https://github.com/gshaviv/DTCoreText, and the particular commit that deals with the paragraph spacing is gshaviv@bf11366

If you use the entire fork as is, you should know it's identical to the master branch here, except for the paragraph spacing change and I also changed it so when you choose a justified text alignment paragraph style it will also hyphenate. For the hyphenation I used libHnj which is distributed under the mozilla public license or LGPL (dual license).

-- Guy

The difference between practice and theory is a lot bigger in practice than in theory...

On Jan 1, 2012, at 23:03 , lucare wrote:

Hi Guy,

Your approach sounds exactly like it want to do. Can you share what changes you made to get the paragraph spacing working? Or point me in the right direction in terms of which file and function that I need to modify.

Thanks,
Bill


Reply to this email directly or view it on GitHub:
#92 (comment)

from dtcoretext.

cxm19881208 avatar cxm19881208 commented on June 12, 2024

so ? no modify now~

from dtcoretext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.