140 Commits

Author SHA1 Message Date
Dustin Howett
23f85d01f0 Merge https://github.com/Microsoft/Console into master 2019-05-02 17:34:28 -07:00
Dustin Howett
4ab4051f63 Merged PR 3219702: Fix elevation by putting Markup & App in the manifest
Related work items: #21424135
2019-05-02 22:47:33 +00:00
Michael Niksa
87e85603b9 Merged PR 3215853: Fix spacing/layout for block characters and many retroactively-recategorized emoji (and more!)
This encompasses a handful of problems with column counting.

The Terminal project didn't set a fallback column counter. Oops. I've fixed this to use the `DxEngine` as the fallback.

The `DxEngine` didn't implement its fallback method. Oops. I've fixed this to use the `CustomTextLayout` to figure out the advances based on the same font and fallback pattern as the real final layout, just without "rounding" it into cells yet.
- `CustomTextLayout` has been updated to move the advance-correction into a separate phase from glyph shaping. Previously, we corrected the advances to nice round cell counts during shaping, which is fine for drawing, but hard for column count analysis.
- Now that there are separate phases, an `Analyze` method was added to the `CustomTextLayout` which just performs the text analysis steps and the glyph shaping, but no advance correction to column boundaries nor actual drawing.

I've taken the caching code that I was working on to improve chafa, and I've brought it into this. Now that we're doing a lot of fallback and heavy lifting in terms of analysis via the layout, we should cache the results until the font changes.

I've adjusted how column counting is done overall. It's always been in these phases:
1. We used a quick-lookup of ranges of characters we knew to rapidly decide `Narrow`, `Wide` or `Invalid` (a.k.a. "I dunno")
2. If it was `Invalid`, we consulted a table based off of the Unicode standard that has either `Narrow`, `Wide`, or `Ambiguous` as a result.
3. If it's still `Ambiguous`, we consult a render engine fallback (usually GDI or now DX) to see how many columns it would take.
4. If we still don't know, then it's `Wide` to be safe.
- I've added an additional flow here. The quick-lookup can now return `Ambiguous` off the bat for some glyph characters in the x2000-x3000 range that used to just be simple shapes but have been retroactively recategorized as emoji and are frequently now using full width color glyphs.
- This new state causes the lookup to go immediately to the render engine if it is available instead of consulting the Unicode standard table first because the half/fullwidth table doesn't appear to have been updated for this nuance to reclass these characters as ambiguous, but we'd like to keep that table as a "generated from the spec" sort of table and keep our exceptions in the "quick lookup" function.

I have confirmed the following things "just work" now:
- The windows logo flag from the demo. (💖🌌😊)
- The dotted chart on the side of crossterm demo (•)
- The powerline characters that make arrows with the Consolas patched font (██)
- An accented é
- The warning and checkmark symbols appearing same size as the X. (✔⚠🔥)

Related work items: #21167256, #21237515, #21243859, #21274645, #21296827
2019-05-02 15:29:10 -07:00
Dustin Howett
d4d59fa339 Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source,
under the MIT license.
experiment-rel-windows-inbox experiment-f-ServerApp v0.1.1093.0 v0.1.1161.0 RS2-final broken-tabstops experiment-OutsideBuild v0.1.1204.0 experiment-master v0.1.1025.0 v0.1.1002.0 v0.1.1211.0
2019-05-02 15:29:04 -07:00
Dustin L. Howett (MSFT)
00bb050826
cleanup: move ISSUE_TEMPLATE to .github/ (#423) 2019-04-30 12:27:12 -07:00
Dustin L. Howett (MSFT)
864f45fa11
Move ColorTool to src/ (#422) 2019-04-30 12:27:06 -07:00
Michael Niksa
723efc70e2
Merge pull request #418 from waf/fix-parser-and-registry-bugs-with-refactor
Fix ColorTool parser and registry bugs, and refactor
1904.29002
2019-04-29 12:12:01 -07:00
Michael Niksa
2d1055d153
Merge pull request #421 from oising/move-readconsoleinputstream-demo
moved readconsoleinputstream to samples folder
2019-04-29 12:10:01 -07:00
oising
987805ebaf moved readconsoleinputstream to samples folder; added readme; updated root readme. 2019-04-29 14:50:38 -04:00
Will Fuqua
f8f4f263a5
standardize casing on PascalCase
Feedback from review. I've decided to go with PascalCase as that's more standard in C# and recommended by MS (see the "Field" row in the table on https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions)
2019-04-26 12:34:55 +07:00
Michael Niksa
2e0fd58bc5
Merge pull request #414 from oising/readconsoleinputstream-demo
ReadConsoleInputStream demo
2019-04-25 10:08:52 -07:00
oising
cfe3eb9624 address PR comments (root namespace) 2019-04-25 10:15:02 -04:00
Rich Turner
370cea5cab Retargeted EchoCon sample project to 17763 now Win10 1809 has shipped (#340) 2019-04-24 17:20:20 -07:00
oising
5bd3f887b1 remove empty xmldoc 2019-04-23 17:40:10 -04:00
oising
2dc178b852 address issues and suggestions in PR review 2019-04-23 17:38:35 -04:00
Will Fuqua
12fff3126b
add support for writing foreground / background indices to registry
This functionality was implemented for the "current console" but was never implemented for writing to the registry, which affects all future consoles.
2019-04-23 22:42:32 +07:00
Will Fuqua
b61cb830c3
allow scheme parsers to opt out of attempting to parse a file
This fixes the issue where the INI file parser can throw errors because it's attempting to parse an `.itermcolors` (xml) file.
2019-04-23 22:04:18 +07:00
Will Fuqua
05f518db5b
replace mutable public fields with properties
The properties are made readonly where possible, which is possible in almost all cases.
2019-04-23 21:51:05 +07:00
Will Fuqua
7daea0a25c
pull logic out of Program.cs
There aren't any user-facing changes in this commit, just pulling logic out of Program.cs. All that remains in Program.cs is command line parsing.

- The functions that wrote to the registry, the console, and the virtual terminal (--xterm) are now in their own files, implementing the `IConsoleTarget` interface
- Move the utility method UIntToColor into ColorScheme, where it can be used as an indexer, e.g. myColorScheme[i] returns a System.Drawing.Color
- The "export to INI" functionality is now in a "SchemeWriters" namespace; Parsers are now in a "SchemeParsers" namespace
- Printing the color table is now in the ColorTable class.
2019-04-23 21:10:16 +07:00
oising
7eea98d4ea add sln file 2019-04-21 13:32:04 -04:00
oising
cade139e0c initial commit for tools/readconsoleinputstream PR 2019-04-21 13:31:36 -04:00
Michael Niksa
619a80ea14
Merge pull request #400 from LokiMidgard/back-and-forground-index-export
Back and forground index export
2019-04-02 10:21:23 -07:00
Patrick Kranz
2661fbe0b9 put console attributes in own variable 2019-04-02 19:09:59 +02:00
Patrick Kranz
a247624e90 encapsule console attributes in struct 2019-04-02 19:09:54 +02:00
Patrick Kranz
3484e07089 Fix spelling of foreground (was forground) 2019-04-02 19:09:36 +02:00
Patrick Kranz
9bf9a6f62c add popup color support to json format 2019-04-02 19:08:53 +02:00
Patrick Kranz
c1e1f5124c Merge branch 'master' into back-and-forground-index-export 2019-04-02 19:04:50 +02:00
Michael Niksa
3990a68770
Merge pull request #402 from LokiMidgard/json-parser-screen-color-support
added Support for parsing screen color in json
2019-04-01 19:16:01 -07:00
Mike Griese
ecea0c9f40
Merge pull request #401 from avdi/master
Document loading colortool schemes from current dir
2019-04-01 07:30:37 -07:00
Patrick Kranz
b38f6ffbd1 Added check if screen or popup colors were not found. 2019-03-29 21:53:50 +01:00
Patrick Kranz
e6500864bc added Support for parsing screen color in json 2019-03-29 21:52:04 +01:00
Avdi Grimm
ee8589110a Document loading colortool schemes from current dir 2019-03-29 15:04:58 -05:00
Patrick Kranz
99f71a0cc5 Export now writes screen and popup indexes in ini 2019-03-29 17:18:26 +01:00
Patrick Kranz
16b1b059a4 added abblity to parse popup and screen color from ini file 2019-03-29 17:09:09 +01:00
Patrick Kranz
cafe71c50b added popup color to scheme 2019-03-29 16:44:41 +01:00
Dustin L. Howett (MSFT)
1145336538
Merge pull request #278 from JakeHL/master
Added location flag to colortool and updated help.
2019-03-28 16:59:38 -07:00
Dustin L. Howett (MSFT)
a30f56645a
Merge branch 'master' into master 2019-03-28 16:59:03 -07:00
Jake Langford
14f9cfc389
Removed trailing slashes on schemes directory 2019-03-28 17:20:08 +00:00
Michael Niksa
52ef47533b
Merge pull request #378 from devhawk/devhawk/errorsArg
Don't report scheme parse errors by default
2019-02-27 12:57:12 -08:00
Harry Pierson
f3e53f1dac updated resources file 2019-02-27 09:50:08 -08:00
Harry Pierson
ae5be18556 add --errors cmd line arg to enable scheme parsing error reporting 2019-02-27 08:33:06 -08:00
Harry Pierson
4a30b1868b change ISchemeParser ParseScheme reportErrors param default to false 2019-02-27 08:32:45 -08:00
Michael Niksa
7e5c034b7f
Merge pull request #314 from Microsoft/signing
Add signing configuration information to repository.
2018-11-29 12:42:22 -08:00
Michael Niksa
058b3f5d19 Austin should be in the list. 2018-11-29 12:38:36 -08:00
Michael Niksa
df1843c87d Add signing configuration information to repository. 2018-11-29 10:32:04 -08:00
AzureAD\JakeLangford
10b05fbe23 fixed trailing slash at the end of path 2018-10-12 09:11:48 +01:00
Jake Langford
66bc1f547e Added location flag to colortool and updated help. Also used path combine for schemes directory 2018-10-10 21:25:36 +01:00
Mike Griese
34ff272cfa
Merge pull request #272 from waf/add-conpty-samples-to-readme
Add the new ConPTY samples to the readme
2018-10-08 09:09:01 -07:00
Will Fuqua
9971abf4e4
add the new ConPTY samples to the readme
Now that both the ConPTY samples (https://github.com/Microsoft/console/pull/247 and https://github.com/Microsoft/console/pull/260) are merged, mention them on the main repository README.
2018-10-06 17:49:48 +07:00
Michael Niksa
5456666d35
Merge pull request #260 from waf/add-csharp-conpty-sample
Add csharp conpty sample
2018-10-04 10:18:34 -07:00