Revert "Add: [Win32] Uniscribe configure options for MinGW targets."
Revert "Change: [Win32] Use Uniscribe instead of ICU for text caret handling." Revert "Change: [Win32/MSVC] Make the Uniscribe text layouter the windows default and remove usage of the deprecated ICU layout libs." Revert "Add: [Win32] Text layout using the native Windows Uniscribe library." Revert "Codechange: Move ParagraphLayouter-specific functions into factory classes instead of relying on overloads." Revert "Add: [Win32] Native natural sort implementation." This reverts commitcd966f3810
. This reverts commiteec3f40931
. This reverts commit33829dc6ab
. This reverts commit768a31bfe3
. This reverts commita4278c302b
. This reverts commitf4394debdc
. This is to fix various problems and crashes with text rendering and font handling on Windows. See #58.
This commit is contained in:
@@ -25,14 +25,6 @@
|
||||
#include <errno.h> // required by vsnprintf implementation for MSVC
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#include "os/windows/win32.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_UNISCRIBE
|
||||
#include "os/windows/string_uniscribe.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ICU_SORT
|
||||
/* Required by strnatcmp. */
|
||||
#include <unicode/ustring.h>
|
||||
@@ -666,32 +658,20 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front)
|
||||
s1 = SkipGarbage(s1);
|
||||
s2 = SkipGarbage(s2);
|
||||
}
|
||||
|
||||
#ifdef WITH_ICU_SORT
|
||||
if (_current_collator != NULL) {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
int result = _current_collator->compareUTF8(s1, s2, status);
|
||||
if (U_SUCCESS(status)) return result;
|
||||
}
|
||||
#endif /* WITH_ICU_SORT */
|
||||
|
||||
#if defined(WIN32) && !defined(STRGEN) && !defined(SETTINGSGEN)
|
||||
int res = OTTDStringCompare(s1, s2);
|
||||
if (res != 0) return res - 2; // Convert to normal C return values.
|
||||
#endif
|
||||
#endif /* WITH_ICU_SORT */
|
||||
|
||||
/* Do a manual natural sort comparison if ICU is missing or if we cannot create a collator. */
|
||||
return _strnatcmpIntl(s1, s2);
|
||||
}
|
||||
|
||||
#ifdef WITH_UNISCRIBE
|
||||
|
||||
/* static */ StringIterator *StringIterator::Create()
|
||||
{
|
||||
return new UniscribeStringIterator();
|
||||
}
|
||||
|
||||
#elif defined(WITH_ICU_SORT)
|
||||
#ifdef WITH_ICU_SORT
|
||||
|
||||
#include <unicode/utext.h>
|
||||
#include <unicode/brkiter.h>
|
||||
|
Reference in New Issue
Block a user