Skip to content

Add setting for fontSize and lineHeight to the integrated terminal - #6998

Merged
Daniel Imms (Tyriar) merged 1 commit into
microsoft:masterfrom
kisstkondoros:terminalfont
Jun 3, 2016
Merged

Daniel Imms (Tyriar) merged 1 commit into
microsoft:masterfrom
kisstkondoros:terminalfont

Conversation

@kisstkondoros

Copy link
Copy Markdown
Contributor

resolves #6728

@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified Daniel Imms (@Tyriar) to be a potential reviewer

@msftclas

Hi Tamas Kiss (@kisstkondoros), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

@Tyriar Daniel Imms (Tyriar) May 28, 2016 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think #6456 should be figured out before the font size and line height is added to prevent addition the charWidth/charHeight settings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I also thought about that, but I have no clean solution in mind...
Perhaps measuring a character like X or M with canvas api... smth. like https://msdn.microsoft.com/en-us/library/ff975421(v=vs.85).aspx

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, that's why I haven't tackled it yet 😉

Something along the lines of that is what I was thinking, I think you might be able to do it by creating a div and measuring that.

@Tyriar Daniel Imms (Tyriar) added the terminal General terminal issues that don't fall under another label label May 28, 2016
@Tyriar Daniel Imms (Tyriar) self-assigned this May 28, 2016
@kisstkondoros

Copy link
Copy Markdown
Contributor Author

Daniel Imms (@Tyriar) The mentioned measurement method seems to work quite well, of course after 3fde039 it will need some adjustments.

@Tyriar

Copy link
Copy Markdown
Contributor

Tamas Kiss (@kisstkondoros) Awesome! 👍

@Tyriar

Copy link
Copy Markdown
Contributor

Tamas Kiss (@kisstkondoros) I merged the PR into master as the 1.2 release was branched off.

@Tyriar

Copy link
Copy Markdown
Contributor

I moved the configuration code into terminalConfigHelper.ts to make it more testable, 775c643

Maybe changing getFontFamily into getFont which returns an ITerminalFont would be best since all 3 values are used together:

export interface ITerminalFont {
    fontFamily: string;
    fontSize: string;
    lineHeight: string;
}

@kisstkondoros
Tamas Kiss (kisstkondoros) force-pushed the terminalfont branch 2 times, most recently from a7be30e to 62b0bb1 Compare June 2, 2016 05:13
@kisstkondoros

Copy link
Copy Markdown
Contributor Author

Daniel Imms (@Tyriar) Please have a look, I hope that was the idea! 😉

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add: " (in pixels)"

@Tyriar

Copy link
Copy Markdown
Contributor

Tamas Kiss (@kisstkondoros) really nice work! Made a bunch of comments, mainly just names and shuffling things around.

@Tyriar Daniel Imms (Tyriar) added this to the June 2016 milestone Jun 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

terminal General terminal issues that don't fall under another label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add setting for fontSize and lineHeight to the integrated terminal

4 participants