Interlisp / medley

The main repo for the Medley Interlisp project. Wiki, Issues are here. Other repositories include maiko (the VM implementation) and Interlisp.github.io (web site sources)
https://Interlisp.org
MIT License
376 stars 19 forks source link

Black box when entering special character in TEdit #1875

Open pamoroso opened 2 weeks ago

pamoroso commented 2 weeks ago

Describe the bug

Entering a bullet or another special character in TEdit produces a black box.

To Reproduce

Steps to reproduce the behavior:

  1. launch Medley
  2. open TEdit
  3. type b
  4. select b
  5. press Ctrl-X

Expected behavior

A bullet symbol is inserted in TEdit.

Screenshots

The TEdit window with the black box produced by entering a bullet, some additional text, and the character looks menu that shows the default font.

bullet-tedit

Context (please complete the following information):

Additional context

TEdit produces black boxes also when entering other special characters such as the dagger with d or the copyright sign with c. The issue occurs also in Medley Online 30-Oct-2024 02:24:26.

pamoroso commented 2 weeks ago

Switching to different fonts like Times New Roman and Helvetica produce the correct bullet character.

rmkaplan commented 2 weeks ago

It depends on the font, not on Tedit. Try switching to Modern or Classic.

On Nov 2, 2024, at 7:25 AM, Paolo Amoroso @.***> wrote:

Switching to different fonts like Times New Roman and Helvetica produce the correct bullet character.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1875#issuecomment-2453007488, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJKFOFCRXXHG63HJJRTZ6TOGNAVCNFSM6AAAAABRBV3PS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGAYDONBYHA. You are receiving this because you are subscribed to this thread.

pamoroso commented 2 weeks ago

Modern, Classic, Times New Romand and Helvetica work. This is probably working as intended.

masinter commented 2 weeks ago

it would be great if we could get better fonts and better font handling,to adapt Medley to work better with high resolution screens, we need larger fonts than we had with Alto fonts (Helvetica, Gacha, Timrd) and with XNS or Unicode characters. The reason we see black boxes is that some XNS fonts don't cover the gamut of characters that are commonly used in INterlisp sources, including left arrow, up-arrow but also back-tick (left single tick).

nbriggs commented 2 weeks ago

It would also be great if the fonts were organized such that we could use the fonts that are currently in fonts/altofonts/*.strike -- for example you can't currently (FONTCREATE 'APL 14) - there seem to be a number of possible solutions.

nbriggs commented 2 weeks ago

If your character looks menu comes up like that, with "DEFAULTFONT-class" preceding "TimesRoman", and you didn't set that by doing something, then there's another problem.

MattHeffron commented 2 weeks ago

It would also be great if the fonts were organized such that we could use the fonts that are currently in fonts/altofonts/*.strike -- for example you can't currently (FONTCREATE 'APL 14) - there seem to be a number of possible solutions.

Actually, you can! I copied fonts/altofonts/apl14.strike to fonts/altofonts/c0/apl14-mrr-c0.displayfont; and then did (FONTCREATE 'APL 14) and it loaded the font. I used EDITCHAR to verify that the loaded font was well behaved. I presume the other font files there could be treated the same way.

rmkaplan commented 2 weeks ago

BTW, in my next update the fontclasses won’t have “class” appended, so DEFAULTFONT will show up as Defaultfont in the menu, and sorted alphabetically. Looks better, and the names are obvious enough.

On Nov 2, 2024, at 2:36 PM, Nick Briggs @.***> wrote:

If your character looks menu comes up like that, with "DEFAULTFONT-class" preceding "TimesRoman", and you didn't set that by doing something, then there's another problem.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1875#issuecomment-2453165177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJIKL7DLZJSWMQ5FYDDZ6VAUVAVCNFSM6AAAAABRBV3PS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGE3DKMJXG4. You are receiving this because you commented.

nbriggs commented 2 weeks ago

Yes, renaming the strike font files is one of the possible solutions. We should probably reorganize the fonts directory in the repository so that the fonts are actually usable.

pamoroso commented 2 weeks ago

@nbriggs That is the default character looks menu with no local customization other than building Medley from source on Linux. The latest Medley Online has the same menu:

tedit-character-looks

nbriggs commented 2 weeks ago

I just rebuilt full.sysout on the rmk36--Tedit-fifth-round-2 branch and it does not do that. I expect the default font to be GACHA (fixed pitch, what the exec windows use).

Char looks before doing a show: Screenshot 2024-11-03 at 9 04 20 AM Char looks after doing a show for some text: Screenshot 2024-11-03 at 9 04 41 AM This is the way it has been for a long time, and the way that I expect it to be. I have no personal init file and am running with the default system greet file.

For online.interlisp.org - I can't easily get at the expanded menus - mac trackpad and I don't seem to be able to generate the middle button. But, doing (TEDIT TEDIT.CHARLOOKS.MENU) gets one displayed and it looks as I expect it to, except for the order of the fonts:

Screenshot 2024-11-03 at 9 17 39 AM

rmkaplan commented 2 weeks ago

If the issue is that Gacha disappeared from the charlooks menu:

I made a first step in discouraging the use of that font (too many black boxes) by not offering it as a family in the default menu.

The second step, not yet done, is to have the menu come up with the fonts that are actually in this particular document. If you have a document that already has Gacha, you would see it as before (except for alphabetiizing, which I thought would make it a little more predictable). Further, if the opening PROPS or TEDIT.DEFAULT..PROPS contains … FONT (Gacha 10)…, Gacha would show in the list.

If you want Gacha and it isn’t yet in the document or in the props, you can type it into the other-font field, select Other, and it will go into the menu.

A third step, also not yet done, is to make the menu sticky, which it has never been. It has always been the case that if you bother to specify another font in the menu (Titan, Symbol…), and click Other, that font goes into the list. And you can then apply it to some text. The glitch is that whether or not you apply it, if you close the menu and reopen it, the font that you specified will have gone away, the menu reverts to the initial built-in list. To use it again, you have to specify it again.

With respect to the DEFAULTFONT-class item, I don’t see that in the release-system menu unless it is explicitly specified, are you seeing that by default? (In the fifth round, I removed the “class” and let it be lower-cased, Defaultfont is less intrusive than DEFAULTFONT.)

On Nov 3, 2024, at 9:21 AM, Nick Briggs @.***> wrote:

I just rebuilt full.sysout on the rmk36--Tedit-fifth-round-2 branch and it does not do that. I expect the default font to be GACHA (fixed pitch, what the exec windows use).

Char looks before doing a show: Screenshot.2024-11-03.at.9.04.20.AM.png (view on web) https://github.com/user-attachments/assets/fec7413e-d6b7-4914-a31d-1354dcc51231 Char looks after doing a show for some text: Screenshot.2024-11-03.at.9.04.41.AM.png (view on web) https://github.com/user-attachments/assets/88b442de-708d-42a5-8144-8639262df0c1 This is the way it has been for a long time, and the way that I expect it to be. I have no personal init file and am running with the default system greet file.

For online.interlisp.org - I can't easily get at the expanded menus - mac trackpad and I don't seem to be able to generate the middle button. But, doing (TEDIT TEDIT.CHARLOOKS.MENU) gets one displayed and it looks as I expect it to, except for the order of the fonts:

Screenshot.2024-11-03.at.9.17.39.AM.png (view on web) https://github.com/user-attachments/assets/a2a81a73-7677-4aa3-9195-4abfab00acb6 — Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1875#issuecomment-2453502364, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJIHBEUEJHB4ICM5N5LZ6ZEPXAVCNFSM6AAAAABRBV3PS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGUYDEMZWGQ. You are receiving this because you commented.

pamoroso commented 2 weeks ago

I see DEFAULTFONT-class in a freshly open TEdit by typinng and selecting some text, then clicking SHOW in the character looks menu.

rmkaplan commented 2 weeks ago

Hmm, I don’t see that. If I run (TEDIT) to get an empty window, type a few characters, then SHOW them, I just see that Terminal is highlighted.

But there are some places in the code where it goes to DEFAULTFONT as a last resort. It may be that what it’s showing in the menu is the current (DISPLAY) instantiation of DEFAULTFONT, which in my case is Terminal. So the bug may be that it didn’t keep track of the font as the fontclass as was actually provided.

But that doesn’t explain why you see it and I don’t. I’ll poke around.

On Nov 3, 2024, at 12:26 PM, Paolo Amoroso @.***> wrote:

I see DEFAULTFONT-class in a freshly open TEdit by typinng and selecting some text, then clicking SHOW in the character looks menu.

— Reply to this email directly, view it on GitHub https://github.com/Interlisp/medley/issues/1875#issuecomment-2453566200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQSTUJN7B5P2TQCLHNRY6O3Z62BF7AVCNFSM6AAAAABRBV3PS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGU3DMMRQGA. You are receiving this because you commented.

pamoroso commented 2 weeks ago

I usually start TEdit from the background menu but (TEDIT) yields the same. I bring up the character looks menu, type something, select, click SHOW, and DEFAULTFONT-class shows up. Both with locally built Medley and Medley Online.