Skip to content
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

Interaction between console size and font size #12

Closed
bluetech opened this issue Jan 30, 2012 · 2 comments
Closed

Interaction between console size and font size #12

bluetech opened this issue Jan 30, 2012 · 2 comments
Assignees

Comments

@bluetech
Copy link
Contributor

First: I use a nVidia card with the nouveau driver. I only have one monitor to test on.

The console size is determined directly according to the chosen KMS mode. However, currently the screen buffer size is initialized statically to some default (80 cols x 24 rows). The font is scaled to match the screen size and the supposed size of a single cell in the console buffer.

This seems to be backwards to me. Since kmscon is a full screen app, what the user should pick is the font size, not the number of rows and columns. So, for example, instead of:
Mode: 1280 x 1024, Buffer 80 x 24 -> Font height 1024 / 24 = 42 (or something like that)
What should be calculated is:
Mode: 1280 x 1024, Font size (10pt) -> Buffer 160 x 70 (or something like that).

The only thing holding this back, as far as I can tell, is that the terminal actually supports multiple outputs. I can't test it, so I'm not sure how that is supposed to work. If I have two monitors, 1280x1024 and 800x600, how would you clone a single console to both of them in a reasonable way? Is that even expected to work?

I'll be happy to hear your thoughts.

@ghost ghost assigned dvdhrm Jan 30, 2012
@dvdhrm
Copy link
Owner

dvdhrm commented Jan 31, 2012

No. This has nothing to do with multiple outputs. I always hated those terminal emulators for providing no way to specify the number of rows/columns so I implemented this. Anyway, it seems that most users prefer specifying the font size instead of the row/column count so I might change the API to support both.

By the way, multiple monitors with the same console is done by rendering the console onto both outputs so our internal representation of the console is independent of the outputs. The pixel-hint in console.c is solely to specify the highest resolution the outputs should support to render the textures with proper resolutions. But they can still be mapped onto any arbitrary output.

Anyway, I think this is not urgent and can be put on the TODO list for 0.2 or so. For 0.1 I think using fixed 80x24 is fine.

Regards
David

@dvdhrm
Copy link
Owner

dvdhrm commented Mar 31, 2012

The new font-renderer has all we want. Default is the behavior that you described, that is, you select the font-size and the backend computes the column/row counts.

As a bonus I also added a second mode which allows to set a fixed column/row count and the backend will scale the fonts. Scaling is slow and may produce horrible-font-hinting. However, I really like this feature so I keep it ;)

The new font-renderer isn't used in the console-layer, yet. Anyway, I close this issue as the hard work is done. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants