Fix and improve font dumping. CORE-16245
- FontGDI->FontObj is not a pointer.
- "%s" does null check, so we remove redundant null checks.
- Add FaceName and StyleName dumping.
addendum to 0.4.13-dev-707-g
0e4db883e5
Jim Tabor intended to structurally use flTextAlign over
lTextAlign internally within IntExtTextOutW().
He initially committed these changes in 0.4.12-dev-805-g
3377fe184e
But we unintentionally lost these changes via 0.4.13-dev-370-g
8f482af0a8
Many thanks to Doug Lyons who helped a lot with fixing CORE-16133.
We assume pso->sizlBitmap.cy is positive. CORE-15995
Because pso->sizlBitmap.cy is certificated as a positive value after initialization in SURFACE_AllocSurface, so we can safely omit abs and labs (absolute) function calls for it.
- Use an auxiliary list where we add the new enumerated faces, for easy
roll-back in case a failure happens during font loading. Only at the
very end when font loading has been successfully done, the auxiliary
list is appended to the corresponding global or per-proceess font list.
- Perform actual cleanup in case of failures.
- Introduce CleanupFontEntryEx() helper to simplify cleanup in
IntGdiLoadFontsFromMemory() in failure paths; implement
CleanupFontEntry() around it.
Additions:
- Perform string buffer NULL check in IntGdiAddFontResource().
- Reorder memory unmapping and section object dereferencing in
IntGdiAddFontResource().
- Move DuplicateUnicodeString() upwards.
- Mark explicitly the Marlett font handling hacks.
Add raster font (*.fnt and *.fon files) support. CORE-16165
- Add IntGetCharSet() function to get the charset by index and/or the number of charsets.
- Make IntGdiLoadFontsFromMemory() a non-recursive function.
- IntGetOutlineTextMetrics() accepts raster fonts.
- Improve CharMap handling (especially TT_PLATFORM_APPLE_UNICODE).
- Write the raster font file info to the registry.
- Don't request font size for raster fonts in IntRequestFontSize() function.
by reverting essential parts of "Font rotation at arbitrary angles"
which was once committed in several steps:
Initial commit (PR#1207)
0.4.12-dev-243-g
f757a13519
broke font rendering for GTK apps CORE-15623
Second commit (PR#1238)
0.4.12-dev-558-g
64987cf273
restored font rendering in GTK apps but introduced slowdown CORE-16020
Katayama agreed to the temporal revert and will try to come up later
with a performance optimized version.
We revert in 0.4.12-RC and 0.4.13-dev.
The revert will cause failure-increases in gdi32:TextTransform
https://reactos.org/testman/compare.php?ids=67898,67901
In NtGdiGetGlyphIndicesW function, allocation of zero size had caused fatal failures.
Avoid allocation of zero size in ExAllocatePoolWithTag calls. Optimize for cwc == 0. CORE-12825
Thanks to the patches author Doug Lyons
and the reviewers hbelusca and Katayama Hirofumi MZ.
The regression was introduced by
0.4.13-dev-24-g
61475b9fed
Fix results from tests, add (last one) gdi batch support for
ExtSelectClipRgn. Left commented out test code in tree this time.
Pass Katayama Hirofumi MZ SelectClipRgn tests. After commit will plug in
the last batch. After 12 years.
See CORE-13817 and CORE-15906.
Add WORLD_XFORM_CHANGED flag to some positioning functions.
Fix IntExtTextOutW function for TA_UPDATECP alignment, so that it can correctly update the current position. CORE-14994
Eliminate some bugs about font enumeration. CORE-15755
- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
There is no need to compile our DLLs as shared libraries since we are
managing symbols exports and imports through spec files.
On my system, this reduces the configure-time by a factor of two.
- Assume that GetTextExtentExPointWPri() uses the same kind of
arguments as GetTextExtentExPointW().
- Add GetTextExtentExPointWPri() declaration to undocgdi.h.
There was a missing break statement in ftGdiGetGlyphOutline().
Found by JIRA contributor 'I_Kill_Bugs' :-)
Add also brackets around 'case's to make code navigation easier.
Fixes regression CORE-15785 (Zim Desktop Wiki 0.67 crashed) and
Fixes regression CORE-15755 (NLite 1.4.9.3 used wrong font)
without reintroducing regression CORE-15558 (AbiWord 2.6.8 font enumeration)
This is achieved by partial revert of
0.4.12-dev-320-g
6e4e5a004c
and got ack of Katayama Hirofumi MZ.
Thanks to patches author Doug Lyons.
Test-results: https://reactos.org/testman/compare.php?ids=66264,66267
Add fix ups to PolyPatBlt and freetype.
TextOut supports 580 characters w/o Dx and Dx at a max of 193 characters
with Dx*1, both if offset is 0.
Noticed a lot of over drawing with start menu from ComCtl32 SB_SETTEXT
going through User32 DrawText/Worker ExtTextOutW. Explain why it might
be slowing down.
If issues arise, commenting out lines in win32ss/include/gdi32p.h can
help.
Example:
else if (Cmd == GdiBCTextOut) cjSize = 0;//sizeof(GDIBSTEXTOUT); <----
this one most of all.
else if (Cmd == GdiBCExtTextOut) cjSize = 0;//sizeof(GDIBSEXTTEXTOUT);
Test results:
https://reactos.org/testman/compare.php?ids=66260,66262
Separate TextOut for internal use.
Use flTextAlign internally.
Not sure why GetDeviceCap was used for determining rendering. SVN commit
logs are unavailable. Include code from wine that might make more sense.
Fix EnumFonts, EnumFontFamilies and EnumFontFamiliesEx functions.
The charsets of the font substitutes are also enumerated.
Delete meaningless codes. CORE-15558
* [WIN32K] Fix handle calculation in DbgGdiHTIntegrityCheck
* [NOTEPAD] Fix MSVC warnings
* [PSDK] Simplify *PROC definitions in windef.h
* [VIDEOPRT] Don't try to use NtVdmControl on x64
* [FREELDR] Fix some macros
* [CRT] Make qsort 64 bit compatible
* [NTOS] Use #ifndef _WIN64 instead of #ifdef _M_IX86 around C_ASSERTs
* [FAST486] Fix 64 bit warnings and change DWORD to ULONG, so it can be used in kernel mode
* [APPHELP_APITEST] Fix 64 bit issue
This helps when e.g. changing the resolution on the Dell Latitude D531,
which reports that it supports large resolutions (e.g. 1920x1440x32 and
others larger than 1024x768x32) but fails to apply these.
This usually happens because PDEVOBJ_pSurface(), and more precisely
ppdev->pldev->pfn.EnableSurface(), fails for these resolutions.
- PDEVOBJ_bSwitchMode(): Set the new video mode, or restore the original
one in case of failure + release the allocated ppdevTmp if previous
calls fail. Also unlock in reverse order of locking order.
- UserChangeDisplaySettings(): In case PDEVOBJ_pSurface() fails (but has
reverted the original video mode), we still need to refresh the
display since the display may have been messed up.
Partially implement font/text rotation by LOGFONT.lfEscapement and improve the rendering image. If the angle was not a multiple of 90 degrees, then the background won't be filled. CORE-11848, CORE-15319
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
- Define IntUnicodeStringToBuffer function to copy the contents of a UNICODE_STRING to a string buffer with a UNICODE_NULL correctly.
- Use it.
JIRA issue: N/A
Preparation to support pen width.
Split IntGdiWidenPath function from PATH_WidenPath function.
IntGdiWidenPath is independent from DC.
CORE-2527, CORE-13534
Add a mechanism that detects via the version resource whether it's needed to mirror
the application layout or not. This is a "follow up" to commit 5b14b6f.
This code is taken from the GetProcessDefaultLayout() function from Wine
(called there "WIN_CreateWindowEx").
In Windows the version-resource mirroring happens when the GDI is loading the LPK.
- Implement mirroring via version resource. GDI linking on startup is required.
- GDI32: Add LPK loading on GDI startup.
To enable mirroring via version resource the lpk.dll must be loaded before any windows are created.
This is done through GdiInitializeLanguagePack() function which is called in GdiProcessSetup().
- LPK: Use Wine debug messaging.
LibreOffice started to show GUI in a mono-spaced font after 0.4.10-dev-466-g
35f62fc5ba
We can fix this by partial revert
as proposed by Katayama Hirofumi MZ, who was author of those changes as well.
We revert the changes in penalty system here.
- Try to make use of ScriptStringCPtoX when trying to fill the lpCaretPos struct member;
if USP10 error happens fallback to the unreorder method.
- Remove now incorrect debug print.
Google Chrome with -no-sandbox parameter in ReactOS wouldn't display the web page because first-chance exception raised.
CORE-14926
- Remove FullName, Style, and FaceName members from TEXTOBJ structure.
- Add TextFace member into TEXTOBJ structure.
- Add MatchFontName() and MatchFontNames() helper functions.
- Fix GetTextFace() and related.
This commit adds support for the MS symbol encoding (FT_ENCODING_MS_SYMBOL) in our font engine.
It also fixes the display of the Anastasia font. And replacing our Marlett font with Windows' Marlett font is also fixed.
CORE-13269, CORE-14907
Fix vertical alignment and Aspect penalty; improve font penalty system; fixes for Wine tests.
This is an update of #706. See CORE-11536 for more details.
The display of the following programs is fixed:
- Total Commander 8.52 setup: font displayed too large - CORE-11620.
- Effective File Search 6.8.1 german localization text rendering issues - CORE-14378.
- Font garbage in register splash screen in Foxit Reader 7.1.5 - CORE-9767.
- Calipers-1 is not displayed correctly - CORE-14302.
- Some MSI-installers draw their dialogs too large (example: Click-N-Type Virtual Keyboard 3.03.0412) - CORE-13161.
- Irfanview 4.50: font in zoom combobox displayed too large - CORE-14396.
- Rufus: The window and controls are displayed larger than necessary - CORE-14461.
Refactor the font engine code in "win32ss/gdi/ntgdi/freetype.c".
- Add "g_" prefix to global variables.
- Make the locking macros function-like.
CORE-13065
Introduce BiDi (bi-directional text) support for ExtTextOut and GetCharacterPlacement, using Wine's GDI BIDI_Reorder function.
Solves the main issue with CORE-7003.
To be compatible with Win2k3+, introduce the "Language Pack" (LPK) dll.
- All the bidi code is removed from gdi32 and replaced by calls to LPK.
Gdi32 uses dynamic linking to lpk.dll. In case of linking failure no bidi processing will be available.
- Implemented LpkGetCharacterPlacement.
- Implement LpkExtTextOut.
- Add a demo test program to show how the apis should function.
- Added all the remaining code, added special case for lpDx calculation if also GCP_GLYPHSHAPE flag was called.
Applications that call GCP that use GCP_GLYPHSHAPE flags should also use the GCP_REORDER flag.
(As written in https://msdn.microsoft.com/en-us/library/windows/desktop/dd144860(v=vs.85).aspx )
- Add ETO_RTLREADING flag handling.
Imported the ETO_RTLREADING flag handling from wine, which changes the string part order (runs).
A RRR1LLLRRR2 string without will show as RRR1LLLRRR2 without it, with it RRR2LLLRRR1.