gpt4 book ai didi

objective-c - iOS 上的核心文本段落空间太大

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:09:19 27 4
gpt4 key购买 nike

我使用 CoreText 来渲染文本如下:

Another very common typesetting operation is drawing a single line of text to use as a label for a user-interface element.
In Core Text this requires only two lines of code, one to create the line object with an attributed string and another to draw the line into a graphic context.
but it shows how to create an attributes dictionary and use it to create.

显然有 3 个段落。我使用默认的 CTParagraphStyleSetting 以便 ParagraphSpacingParagraphSpacingBefore 默认设置为 0。

但渲染结果显示空间太大
rendered text with 3 paragraphs

有减少段落空间的想法吗?

最佳答案

关于objective-c - iOS 上的核心文本段落空间太大,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7189284/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com