-
Notifications
You must be signed in to change notification settings - Fork 73
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
New port -- OS2GUI #315
New port -- OS2GUI #315
Conversation
Setting up all code pages and fonts in advance was drastically slowing down the rendering.
Thank you for the work you've put into that! Out of interest: can you please make a screenshot on ozdemo in the os2 and os2gui port and share those here? |
@Bill-Gray: the Makefiles skip newtest for !WIN32 - is that reasonable? |
Great work! I look forward to building THE with it. |
Looks good to me. I can't really test it; once you and Mark give it the thumbs-up, I'll pull it. I think the most I can do is to cross-compile it on my Linux box using OpenWATCOM; I've no way of running an OS/2 program. The one minor nit I can pick is that we'll have to add a @GitMensch , in re |
OK, I've added a I've had no trouble building |
@GitMensch - nevermind, I see now; the Makefiles for OS/2, and therefore those for this port, haven't had the list of demos updated for a while. None of the demos are platform-specific (except for |
I haven't done extensive testing, but I've tried to change the font and font size by setting the environment variable PDC_FONT. I've tried set PDC_FONT=Courier:8, set PDC_FONT=DejaVu Sans:8 but neither makes a difference to the resulting font face/size. BTW DejaVu Sans is a truetype font which displays fine in the Font Viewer. On a related matter for which I'll do some more digging but there is inconsistency between platforms in how the font face and size are specified. On some there is PDC_FONT=face:size on other PDC_FONT=face, PDC_FONT_SIZE=size. |
Cool. Can you please adjust the makefile (maybe also cmakelist) to have newest built (ideally also for OS2) and share a screenshot for comparison?
Am 8. Februar 2024 03:38:54 MEZ schrieb chasonr ***@***.***>:
…OK, I've added a `PDC_PORT_OS2GUI` enum.
I've had no trouble building `newtest` in the OS2GUI port. I used it quite a lot to get the Unicode rendering right.
--
Reply to this email directly or view it on GitHub:
#315 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Bill, can you please share the necessary adjustments to have it cross-compiled in the CI? This way it can be included in the PR and be compile-tested automatically.
|
|
@chasonr - speaking from a basis of ignorance here, but... re "I have to render one character at a time or strange things happen" : I wonder if some splitting up of text would help? If the text 'Piñata' were sent to (This occurs to me because I had to do something similar with fullwidth and combining characters, which are handled differently in the various forks of Windows. Internally, the |
* Use PDC_FONT in preference to registry * Support PDC_FONT_SIZE * Don't save font face and size if set via environment
EMX 0.9d uses an ancient version of GCC. This does not have -Wextra, and requires a space after -o. It can build PDCurses, but only in narrow mode; it does not have wchar.h.
I've added support for PDC_FONT_SIZE, made PDC_FONT override the registry and made mouse clicks put focus on the window. |
Shouldn't the environment variables be handled identical in WinGUI - or is that already the case?
Note: I think that environment overrides should *not* be stored in the file system.
|
Have applied the PDC_FONT and click to front changes. The click to front works fine, but I have some more testing of the PDC_FONT behaviour. |
I do have one more request for a change before we merge. The support for the PDCursesMod program being able to trap the window close event should be made to OS2GUI the same as the WINGUI functionality. In fact I copied the code for the WM_CLOSE event from wingui/pdcscrn.c to os2gui/pdcscrn.c and THE could catch the window close event. |
WinGUI doesn't support PDC_FONT. Existing ports that support it are DOSVGA, FB, GL, SDL1 and SDL2. PDC_FONT_SIZE is supported in GL, SDL1 and SDL2. In DOSVGA, the font format is PSF, which has but one font size per file and so PDC_FONT_SIZE is moot. Perhaps FB has that property also? OS2GUI at its present state does not save the font settings if they came from PDC_FONT and PDC_FONT_SIZE. |
The framebuffer/DRM port (basically the same port, except with different libraries used to push pixels to the screen) lets you specify a PSF or PSF2 or "plain" VGA font with The framebuffer/DRM port also allows you to specify more fonts as The general idea that how fonts are specified ought to be similar across ports resonates with me. It does get to be difficult when some ports use PSF/PSF2/VGAfont formats, which provide only one size, and others are more scalable. (SDLn in non-WIDE mode uses an unusual bitmap format consisting of a Windows™ .BMP file, which resembles the PSF/PSF2/VGAfonts in only providing a single font size... I've long thought that it might be good to rip out the font-handling bits of FB/DRM, put them into Anyway... at the very least, it seems to me that WinGUI ought to respond to |
Added code to respond to WM_CLOSE. It's just a direct crib from the WinGUI port. |
@Bill-Gray Without looking into the depths of this PR... Should this new port be merged? Is there something open? |
@GitMensch -- Thanks for the nudge on this, and my apologies to @chasonr; I really shouldn't have left this dangling since February. As I mentioned originally, I don't have an OS/2 machine and can't vouch for it myself. (I can look at the parts outside the Two minor things not really required at present, but which we might do after merging :
The "slicing" there ensures that fullwidth and combining characters are broken apart, and to avoid sending excessively long lines to The bit about |
Should add : I've verified that everything (including demos and 'tests') compiles without errors on OpenWATCOM on Linux. I have no way to compile for OS/2 with gcc (far as I know, you can't cross-compile). And there was discussion above about the fact that I have put a modified https://www.projectpluto.com/temp/Makefile The same I'm not pushing it because (since I can't cross-compile) it is 100% untested. It should add the missing demos |
If only it was as simple as using the same Makefile for os2 port and os2gui port :-) I've built the demos using the Makefile linked above with changes, but only with a static library. Have not built the DLL yet. Will work on that next. |
The console version of OS/2 Makefile also did not create the pdcurses.dll correctly. I have attached the modified os2/Makefile and os2gui/Makefile which enable building both static library and DLL in the one directory and all demos linked against static library or DLL import library. |
Hi Mark - thank you! Unless I'm missing something, this looks to be a zip-ball of all of PDCursesMod from 2023 Jun 1, with no os2gui directory. Probably not what you intended to send... Send me the files in question, or make a PR for them, and I'll pull your fixes plus this PR. Nice to see this added... |
I've added Mark's revisions to the OS/2 console Also, we'll need to update some of the documentation (main |
Not sure what changes that @chasonr has made that need to be merged with the os2gui/Makefile I sent. I'm happy to do the merge, but the os2gui/Makefile builds a static library and DLL and all demos so is complete AFAIAC. |
Looking a bit more closely, it seems to me @chasonr based his Perhaps we should just replace the current |
Yes there is a lot of stuff in @chasonr os2gui/Makefile that is not needed for the os2gui port. A complete replacement was my intention. |
Okay, that makes sense. I've pushed it as commit 267f92a. |
This port provides a windowed display on OS/2, similar to the one that WinGUI provides.
It provides limited support for Unicode, but no supplementary characters. Some of the algorithms that support Unicode might be useful on other ports, such as SDL1 and 2.