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

Text block with italic and justified text seems to be cut off #9993

Open
MartyIX opened this issue Sep 15, 2024 · 0 comments
Open

Text block with italic and justified text seems to be cut off #9993

MartyIX opened this issue Sep 15, 2024 · 0 comments
Labels
area-TextBlocks TextBlock, RichTextBlock bug Something isn't working

Comments

@MartyIX
Copy link
Contributor

MartyIX commented Sep 15, 2024

Describe the bug

It seems that italic font is not taken into account by text blocks and as a result some characters might not be displayed fully.

Steps to reproduce the bug

The following XAML code reproduces the issue:

<TextBlock FontStyle="Italic" TextAlignment="Justify" TextWrapping="Wrap" Padding="0">
    <TextBlock.Text>
        Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard 
        dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
        It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
        It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with 
        desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
    </TextBlock.Text>
</TextBlock>

(See https://github.com/MartyIX/WinUiDemos/tree/feature/2024-09-15-TextBlock-italic-and-justify and MartyIX/WinUiDemos@76c0d04)

It displays as follows:

image

where f (and other characters) is not fully visible:

image

Expected behavior

All characters should be fully displayed.

Screenshots

No response

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

As a workaround one can set the Padding attribute of <TextBlock> - e.g.


<TextBlock.Text>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard
dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</TextBlock.Text>

The result is then:

image

@MartyIX MartyIX added the bug Something isn't working label Sep 15, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Sep 15, 2024
@codendone codendone added area-TextBlocks TextBlock, RichTextBlock and removed needs-triage Issue needs to be triaged by the area owners labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-TextBlocks TextBlock, RichTextBlock bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants