Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Nov 28, 2017

Relatively simple changes were needed to get libtxt building on Windows, but some tests which were failing due to Windows not rendering fonts the same as other platforms are now disabled on Windows.

Also, I haven't had a chance to run the code formatter yet since Windows buildtools doesn't have clang. Will probably pull on Linux and commit formatted changes after review before submitting.

Relatively minor changes were needed to get libtxt building on Windows
(missing/incompatiable headers, the odd syscall, path separators, etc.).
Windows doesn't render text in the same way as other platforms, so some tests
that checked for specific pixel offsets are disabled.
}

do {
if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

what is the purpose of this check?

Copy link
Contributor Author

@bkonyi bkonyi Nov 28, 2017

Choose a reason for hiding this comment

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

This checks that the WIN32_FIND_DATAA isn't a directory or an archive since we're only interested in files. Actually, this should probably be FILE_ATTRIBUTE_DIRECTORY. EDIT: This wasn't right. See next comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since font files are archivable, we only need to consider files which have this attribute.

@bkonyi bkonyi merged commit da43e7c into master Nov 30, 2017
@bkonyi bkonyi deleted the windows_libtxt branch November 30, 2017 21:46
bsalomon pushed a commit to bsalomon/engine that referenced this pull request Dec 8, 2017
…flutter#4395)

* Added Windows support for libtxt in order to build flutter_tester.exe.

Relatively minor changes were needed to get libtxt building on Windows
(missing/incompatiable headers, the odd syscall, path separators, etc.).
Windows doesn't render text in the same way as other platforms, so some tests
that checked for specific pixel offsets are disabled.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants