line height
line height
i was try to change that in the master (i was try change typo ascender, typo descender, typo line gap, win ascent , win descent, ascender, descender, line gap but the result is nothing for to change that happen), i was use fontgautlet & fontcreator web testing but the result are nothing to change. how to solve this?
- Attachments
-
- Untitled.png (162.95 KiB) Viewed 5094 times
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: line height
Within the Web Font Test page we use javascript to keep font size in sync with line-height.
I am not sure why we decided to enforce this, so maybe we just have to remove that.
Code: Select all
function UpdateFontSize(sender) {
id = document.getElementById("preview");
id.style.fontSize = sender.value + "pt";
id.style.lineHeight = sender.value + "pt";
id = document.getElementById("mi-preview");
id.style.fontSize = sender.value + "pt";
id.style.lineHeight = sender.value + "pt";
}
Re: line height
hi, i think you've got the project right
but i think, isn't about the javascript too in software too. but just make a space of the line height, how to solve this? help me please
but i think, isn't about the javascript too in software too. but just make a space of the line height, how to solve this? help me please
Re: line height
This is actually helpful to have the line height set to 1.0 as default, but I would suggest adding a drop-down or number input to choose a different line height. I can help with that if its needed. Let me know
Re: line height
Hey Erwin,
I attached new WOFFTest Files (all files are updated, css+js+html)
Before:
After (New: Line Height Input)
Let me know if you have any questions or suggestions
I attached new WOFFTest Files (all files are updated, css+js+html)
Before:
After (New: Line Height Input)
Let me know if you have any questions or suggestions
- Attachments
-
- WOFFTest.zip
- (10.14 KiB) Downloaded 160 times
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: line height
I wonder if there could be an easier way to select Background and Foreground colours? Maybe a drop list with half a dozen presets as well as the option to enter Hex values.
Re: line height
Sure!
Please note that someone from FC Team should buy a license for "jscolor" in order to use it commercially. it cost $20.
You can purchase a license here:
https://jscolor.com/download/
Working Example:
new html+js files added in this zip file.
Please note that someone from FC Team should buy a license for "jscolor" in order to use it commercially. it cost $20.
You can purchase a license here:
https://jscolor.com/download/
Working Example:
new html+js files added in this zip file.
- Attachments
-
- WOFFTest.zip
- (23.26 KiB) Downloaded 148 times
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: line height
That is perfect.
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: line height
The color selector looks nice, but I prefer to keep the test page as basic as possible. The more dependencies, the more we need to update it in the future.
From what I understand it is better to avoid the em suffix, see:
https://developer.mozilla.org/en-US/doc ... ine-height
It would also be nice to include "normal" as line-height option. That way the OP can test his own font metrics.
From what I understand it is better to avoid the em suffix, see:
https://developer.mozilla.org/en-US/doc ... ine-height
It would also be nice to include "normal" as line-height option. That way the OP can test his own font metrics.
Re: line height
line-height: 3em behave exactly the same as line-height: 3. I don't see any difference. I don't mind removing the 'em' text, but it would sill behave the same wayErwin Denissen wrote: ↑Sun Jan 01, 2023 11:24 am The color selector looks nice, but I prefer to keep the test page as basic as possible. The more dependencies, the more we need to update it in the future.
From what I understand it is better to avoid the em suffix, see:
https://developer.mozilla.org/en-US/doc ... ine-height
It would also be nice to include "normal" as line-height option. That way the OP can test his own font metrics.
There is no "normal" line height in CSS, it needs to be a defined number. The default of 1 is good for font making purposes
Are you sure about the color picker? it looks so much fun.
Re: line height
I do think however that it would be better to have colorjs.min.js file by itself, and not in our script file.
It needs to be included as a dependency (different file).
It needs to be included as a dependency (different file).
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: line height
I am referring to a draft, so this might not be official and can change in the future, but still Firefox and Edge accept normal right now.
See:
Line Spacing: the line-height property
and
Calculating the Logical Height Contributions (“Layout Bounds”) of Inline Boxes
If line-height is set to normal, both Typo Ascender and Typo Descender are used, as mentioned here:
Ascent and Descent Metrics
Note: It is recommended that implementations that use OpenType or TrueType fonts use the metrics sTypoAscender and sTypoDescender from the font’s OS/2 table (after scaling to the current element’s font size) to find the ascent metric and descent metric for CSS layout. In the absence of these metrics, the "Ascent" and "Descent" metrics from the HHEA table should be used.
Re: line height
Ok, I can add 'normal' but I still think 1.0 should be the default
attached:
attached:
- removed 'em' (it behaves the same way anyway)
- added 'normal'
- Attachments
-
- WOFFTest.zip
- (24.73 KiB) Downloaded 170 times
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: line height
Yes, I prefer to have zero dependencies. Maybe a combobox with several predefined colors will do.
-
- Moderator
- Posts: 11158
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: line height
We have just released an update that comes with the line height option in the Web Font test page. Unfortunately the initial value is 1, while the selection indicates it is 1.2. That will be fixed with a future update.