Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
f7f7fec4
Commit
f7f7fec4
authored
10 years ago
by
Zeno-
Browse files
Options
Downloads
Patches
Plain Diff
(INTERIM) Make sizes of the font in formspecs consistent and not so large
Until a permanent fix can be developed
parent
c16b1e26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/constants.h
+1
-1
1 addition, 1 deletion
src/constants.h
src/guiFormSpecMenu.cpp
+16
-0
16 additions, 0 deletions
src/guiFormSpecMenu.cpp
with
17 additions
and
1 deletion
src/constants.h
+
1
−
1
View file @
f7f7fec4
...
@@ -98,7 +98,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
...
@@ -98,7 +98,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
* GUI related things
* GUI related things
*/
*/
#define LEGACY_SCALING (2./3.)
#define LEGACY_SCALING (2./3.)
#define TTF_DEFAULT_FONT_SIZE (1
3
.0 / LEGACY_SCALING)
#define TTF_DEFAULT_FONT_SIZE (1
2
.0 / LEGACY_SCALING)
#define DEFAULT_FONT_SIZE (14)
#define DEFAULT_FONT_SIZE (14)
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
src/guiFormSpecMenu.cpp
+
16
−
0
View file @
f7f7fec4
...
@@ -76,6 +76,21 @@ static unsigned int font_line_height(gui::IGUIFont *font)
...
@@ -76,6 +76,21 @@ static unsigned int font_line_height(gui::IGUIFont *font)
static
gui
::
IGUIFont
*
select_font_by_line_height
(
double
target_line_height
)
static
gui
::
IGUIFont
*
select_font_by_line_height
(
double
target_line_height
)
{
{
return
g_fontengine
->
getFont
();
/* I have no idea what this is trying to achieve, but scaling the font according
* to the size of a formspec/dialog does not seem to be a standard (G)UI
* design and AFAIK no existing nor proposed GUI does this. Besides that it:
* a) breaks most (current) formspec layouts
* b) font sizes change depending on the size of the formspec/dialog (see above)
* meaning that there is no UI consistency
* c) the chosen fonts are, in general, probably too large
*
* Disabling for now.
*
* FIXME
*/
#if 0
// We don't get to directly select a font according to its
// We don't get to directly select a font according to its
// baseline-to-baseline height. Rather, we select by em size.
// baseline-to-baseline height. Rather, we select by em size.
// The ratio between these varies between fonts. The font
// The ratio between these varies between fonts. The font
...
@@ -105,6 +120,7 @@ static gui::IGUIFont *select_font_by_line_height(double target_line_height)
...
@@ -105,6 +120,7 @@ static gui::IGUIFont *select_font_by_line_height(double target_line_height)
}
}
}
}
return g_fontengine->getFont(target_line_height - lohgt < hihgt - target_line_height ? loreq : hireq);
return g_fontengine->getFont(target_line_height - lohgt < hihgt - target_line_height ? loreq : hireq);
#endif
}
}
GUIFormSpecMenu
::
GUIFormSpecMenu
(
irr
::
IrrlichtDevice
*
dev
,
GUIFormSpecMenu
::
GUIFormSpecMenu
(
irr
::
IrrlichtDevice
*
dev
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment