Commit graph

15 commits

Author SHA1 Message Date
Mike Griese dec5c11e19
Add support for passing through extended text attributes, like… (#2917)
## Summary of the Pull Request
Adds support for Italics, Blinking, Invisible, CrossedOut text, THROUGH CONPTY. This does **NOT** add support for those styles to conhost or the terminal.

We will store these "Extended Text Attributes" in a `TextAttribute`. When we go to render a line, we'll see if the state has changed from our previous state, and if so, we'll appropriately toggle that state with VT. Boldness has been moved from a `bool` to a single bit in these flags.

Technically, now that these are stored in the buffer, we only need to make changes to the renderers to be able to support them. That's not being done as a part of this PR however.

## References
See also #2915 and #2916, which are some follow-up tasks from this fix. I thought them too risky for 20H1.

## PR Checklist
* [x] Closes #2554
* [x] I work here
* [x] Tests added/passed
* [n/a] Requires documentation to be updated


<hr>

* store text with extended attributes too

* Plumb attributes through all the renderers

* parse extended attrs, though we're not renderering them right

* Render these states correctly

* Add a very extensive test

* Cleanup for PR

* a block of PR feedback

* add 512 test cases

* Fix the build

* Fix @carlos-zamora's suggestions

* @miniksa's PR feedback
2019-10-04 15:53:54 -05:00
Michael Niksa 52534c94cc Combined changes to make the build work again (see inside) (#2945)
* Revert "Add source linking information during the build (#2857)"

This reverts commit 6b728cd6d0.

* Need reference to renderer base inside UnitTests_TerminalCore
* add dependency for TerminalControl to Types project.
* Set build to single threaded as parallel build is broken by 16.3 build toolchain.
* Disable new rule C26814 as it's breaking builds
   Wrote a follow up task #2941 to roll it out later.
* Add noexcept to dx header.
2019-09-30 10:39:55 -07:00
Michael Niksa d8ff47a0d3 Some of the PR feedback. 2019-09-05 17:21:54 -07:00
Michael Niksa 93aa9455e2 C26429, test for nullness or mark as not_null (and a few cascading warnings. 2019-09-03 15:14:44 -07:00
Michael Niksa 3bbd8f4c97 C26443, overriding destructors shouldn't declare virtual nor override. 2019-09-03 14:14:07 -07:00
Michael Niksa 2d3f285894 C26432, rule-of-five (if you define one of destruct/copy/move, then define them all) 2019-09-03 13:45:16 -07:00
Michael Niksa c956913a28 C26497, use constexpr for functions that could be evaluated at compile time. 2019-09-03 10:30:06 -07:00
Michael Niksa 4f1157c044 C26447,C26440 - is noexcept but can throw or doesn't throw but not noexcept 2019-08-29 15:23:07 -07:00
Dustin L. Howett (MSFT) 28b767d00b
dx: Render all gridlines (and, bonus: the box cursor) properly (#2491)
Since we're rendering with antialiasing enabled, we need to make sure
we're stroking actual pixels; to do that, we need to adjust all of our
coordinates by the StrokeWidth / 2. We're always using a stroke width of
1, so that means 0.5.

While I was here, I took the opportunity to fix the color of the grid
lines. Fixes #543.
2019-08-20 16:14:26 -07:00
Michael Niksa 56589c0aac
Fixes crash when specifying invalid font (#2153)
* Stop the crash with fonts by trying a few fallback/backup fonts if we can't find what was selected.
* Create fallback pattern for finding a font. Resolve and pass the locale name. Retrieve the font name while retrieving the font object. Use retrieved data in the _GetProposedFont methods instead of re-resolving it.
* Add details to schema about fallback. Finish comment explaining fallback pattern to doc comment on method.
2019-07-30 14:32:23 -07:00
Daniel Griffen 0219781753 Allow the DX rendering engine to run on Windows 7 (#1274)
Certain DirectX features are unavailable on windows 7. The important ones as they are used in the DX renderer are color font rendering and fallback font support. Color fonts did not exist at all on windows 7 so running basic glyphrun rendering should work just fine.

Fallback font support was not exposed to the user in windows 7, making dealing with them difficult. Rather than try to get some workarounds to properly enable it I have opted to just conditionally disable the support on windows 7.
2019-07-11 15:20:15 -07:00
Daniel Griffen b9e66fee6d Add a fallback to software rendering (#1263)
This commit enables a software rendering fallback for the DX renderer in the case that hardware acceleration fails. This is primarily useful for Hyper-V environments where hardware acceleration is not guaranteed to exist.

This will be useful for future work to enable the DX renderer to run on windows 7 since win7 virtual machines do not/cannot have hardware acceleration unlike windows 10 machines

This commit does two things:
- Fallback to `D3D_DRIVER_TYPE_WARP` if `D3D_DRIVER_TYPE_HARDWARE` fails.
- pass `NULL` as the adapter instead of creating the default adapter ourselves.
2019-06-24 17:02:26 -07:00
Dustin L. Howett (MSFT) 08464648f2
inbox: reflect incoming changes from Windows (#1359)
official/rs_onecore_dep_acioss 9638166d8c8374081a2aa8b8f9ecabf2bae0df0a
2019-06-20 17:51:04 -07:00
adiviness 9b92986b49
add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -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.
2019-05-02 15:29:04 -07:00