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

Word Export LT-21673: Fix font problems for bidi text #193

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

mark-sil
Copy link
Contributor

@mark-sil mark-sil commented Oct 31, 2024

For some writing systems Word was not using the correct font or correct font size.


This change is Reviewable

For some writing systems Word was not using the correct
font or correct font size.

Change-Id: I6fe419e919fc9fd3bc44b032e564a68579e74d4a
@mark-sil mark-sil requested a review from aror92 October 31, 2024 13:52
Copy link
Contributor Author

@mark-sil mark-sil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @aror92)


Src/xWorks/WordStylesGenerator.cs line 510 at r1 (raw file):

			if (fontName != null)
			{
				var font = new RunFonts()

@aror92 It is not always necessary to set all four font names and to set the font size for complex scripts, but I think it is probably safest. I'm not sure of a reliable way to figure out when they are needed, and it's a relatively small amount of data so it probably doesn't matter.

Copy link
Contributor

@aror92 aror92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @mark-sil)


Src/xWorks/WordStylesGenerator.cs line 510 at r1 (raw file):

Previously, mark-sil (Mark Kidder) wrote…

@aror92 It is not always necessary to set all four font names and to set the font size for complex scripts, but I think it is probably safest. I'm not sure of a reliable way to figure out when they are needed, and it's a relatively small amount of data so it probably doesn't matter.

I also can't think of a good way to check which font type a run should use. Of course some fonts are not allowed to be used for certain types (e.g. Scheherazade can't be Ascii), but I think this will still work fine in Word. And the way we create the runs & fonts, we shouldn't run into situations where a run with a strictly ComplexScript fontName would have characters that would actually use the specified Ascii font anyway. I do wonder if we may see some issues related to this in LibreOffice or when importing to InDesign, but we can investigate that later.

@mark-sil mark-sil merged commit cc18faf into release/9.1 Oct 31, 2024
4 of 5 checks passed
@mark-sil mark-sil deleted the LT-21673a branch October 31, 2024 16:10
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

Successfully merging this pull request may close these issues.

2 participants