Skip to content

FONTSAMPLE add option for which charset to display #2002

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

Closed

Conversation

MattHeffron
Copy link
Contributor

No description provided.

If destination is a window, then CLEARW that window before displaying.
Revert FNT.DISPLOOK changes. (It always only uses charset 0.)
@MattHeffron MattHeffron self-assigned this Feb 1, 2025
@MattHeffron MattHeffron added the enhancement New feature or request label Feb 1, 2025
Copy link
Contributor

@nbriggs nbriggs left a comment

Choose a reason for hiding this comment

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

See comment attached.

Do you know about lispusers>fontsampler (which already had character sets as an option)?

(FNS FNT.MAKEBOOK FNT.LESSP FNT.SORTP FNT.DISPLOOK FNT.DISPTBLE FNT.DISPDSCR FNT.NARRDSCR
FNT.DISPINIT FNT.FACEMAP FNT.SIZEMAP FNT.MAKENAME FNT.MAKEWIND FNT.FILEMAP FNT.FINDALL
FNT.FLST)
(DECLARE%: EVAL@COMPILE DONTCOPY (FILES (FROM LOADUPS)
Copy link
Contributor

Choose a reason for hiding this comment

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

It makes me uncomfortable to introduce a dependency on "LOADUPSDIRECTORIES" - if it really needs EXPORTS.ALL (does it?) then just (FILES EXPORTS.ALL) and it should use DIRECTORIES which should be set up in the site init file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, in general, how should dependency on system level definitions (e.g., CHARSETINFO, FONTDESCRIPTOR, ...) be set in the COMS for modules in LIBRARY or LISPUSERS? The pattern:

(DECLARE%: EVAL@COMPILE DONTCOPY (FILES (FROM LOADUPS)
                                                EXPORTS.ALL))

I found in UNICODECOMS. (@rmkaplan)

Copy link
Member

Choose a reason for hiding this comment

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

I think the convention in the past was that those working on the "low level" system or calls to it would load the file SYSEDIT; SYSEDIT sets some variables as well as loading EXPORTS.ALL if needed. (There was also a file called "ABC" which looked like SYSEDIT and I tried to merge the two.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See also related discussion in PR 2003

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@masinter

I think the convention in the past was that those working on the "low level" system or calls to it would load the file SYSEDIT

But ... SYSEDIT does:

(RESETVARS ((CROSSCOMPILING T))
           (FILESLOAD (SOURCE FROM LOADUPS)
                  EXPORTS.ALL))

So why wouldn't it be acceptable for individual modules (e.g., on lispusers) to do a similar FILESLOAD under (DECLARE%: EVAL@COMPILE DONTCOPY. (Without the (RESETVARS ((CROSSCOMPILING T)) which is SYSEDIT-specific.) This also wouldn't change other system-level VARS that a particular user might not want changed.

More discussion? @rmkaplan @nbriggs

Copy link
Contributor

Choose a reason for hiding this comment

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

@MattHeffron it only does it exactly like that because Larry changed it to do the FILESLOAD "FROM LOADUPS". It's the "FROM LOADUPS" that I'm objecting to, rather than having the right things on DIRECTORIES and not the fact of loading exports.all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But ... where did LOADUPSDIRECTORIES come from?
I take it that you're proposing that it be removed from the standard loadup sysouts?

Copy link
Contributor

Choose a reason for hiding this comment

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

It (LOADUPDIRECTORIES) is set in sources/MEDLEYDIR -- and while I'm happy to have the mechanism there (though I think MEDLEYDIR should be in library not sources), I don't believe that that is the right place to set up a lot of values that are not actually a fundamental part of the system - that's the role of the site init (site greet) file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, instead of a LOADUPDIRECTORIES variable, would it be better (acceptable) for individual modules (e.g., on lispusers) to have:

(DECLARE%: EVAL@COMPILE DONTCOPY
           (FILES (SOURCE FROM VALUEOF (MEDLEYDIR "loadups>")) EXPORTS.ALL))

Should the location of EXPORTS.ALL be a known place?
The loadup sysout files are in the loadups directory because the MEDLEYDIR/scripts/medley/medley.command expects to find them in loadups.
Why not have the same a priori condition that EXPORTS.ALL is in the same place?

Or, should modules like these have a MODULENAME-SETUP-TO-COMPILE function that does the setup, or prints the setup instructions?

And, is it generally better for modules to load EXPORTS.ALL (somehow), or should they use LOADCOMP of the specific system module(s) needed? E.g., TEDIT has:

(DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) UNICODE))

I'm not trying to be difficult!

Should this discussion be extracted into a GitHub Issue or Discussion?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it should just have (DECLARE: EVAL@COMPILE DONTCOPY (FILES EXPORTS.ALL)) - MEDLEYDIR and anything like that has anything to do with running on the emulator, unless the module is specifically targeted to something Unixy, should not appear in the module. The locations for everything should be set up in the site greet file and appear on DIRECTORIES, which FILESLOAD and friends already know about. I think that an EXPORTS.ALL that corresponds to the files that are in sources and library should be checked in to library, or at least it should appear there in the assets of the release. I don't know about TEDIT and UNICODE.

@MattHeffron
Copy link
Contributor Author

Do you know about lispusers>fontsampler (which already had character sets as an option)?

I did not. I used FONTSAMPLE to check the BDF font conversion because you had recommended it to me back in December.
This can be closed without merging if that already has this functionality.

@masinter
Copy link
Member

masinter commented Feb 1, 2025

i'm confused about library/FONTSAMPLE vs. lispusers/FONTSAMPLER as they seem to be very different.
Also, neither one seems to print out an (enlarged) bitmap from the DISPLAYFONT -- I can't quite tell ...

Anyway, it would be good to at least have a description of what's going on.

@nbriggs
Copy link
Contributor

nbriggs commented Feb 2, 2025 via email

@MattHeffron
Copy link
Contributor Author

MattHeffron commented Feb 3, 2025

Yes, they're different. I wrote FONTSAMPLER in 1985 because FONTSAMPLE didn't do what I wanted.

Alas, it cannot create a PDF file showing the DISPLAYFONT glyphs (bitmaps), which would be really handy to check out my BDF to DISPLAYFONT conversion. So I added that ability: PR #2008 😉

@MattHeffron MattHeffron closed this Feb 3, 2025
@masinter masinter deleted the mth32--FONTSAMPLE-Add-option-for-charset-to-display branch February 3, 2025 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants