Connor Peet 5767f6f21b minimap - allow variable scaling (#82265)
* minimap - allow variable scaling

This PR allows the minimap to be scaled to several constant values. Most of the
work in this PR is adjusting the the font renderer to render character at
variable sizes. It turns out most generic image scaling algorithms are not
built to scale down to one or two pixels (the default minimap font size has
1px by 2px characters), so some work was needed to make this possible and look
good.

Generating fonts at runtime does incur a small performance penalty, taking
about 0.6m at 1x scale and 0.9ms at 4x scale on my machine to create the font
the first time we render a minimap. If we want to avoid this, we could consider
shipping pre-rendered font for the first few scale settings.

At this moment this only supports scaling to a constant integer--effectively,
scaling the character width, since we start at 1x2px. More granular scaling
would be interesting, but will come at a runtime cost as we'll need to do
linear interpolation for each character we draw at a non-integral coordinate.

Draw speed is comparable to the previous version, the profiler reported in
the range of 8-11ms to render my test file in both the previous and new code.

I've tested this on my high DPI Macbook display and it appears to work well
there too.

Talking to Alex, something we may need to look into is matching the user font
and render settings. Previously, and continuing in this PR, we use the default
monospace font on the system with a restricted set of character codes.
Previously the sidebar's font was too small to be visible, but now its content
can be seen under large settings. We may need to look and reworking how this
data is rendered. Perhaps we generate the characters we need on the fly into
their own buffers? Open to ideas.

Fixes https://github.com/microsoft/vscode/issues/21773

* fixup! not caching created factory

* fix common/browser component layering

* fixup! use a constant upscale for hDPI

* small tweaks

* fixup! pr comments

* fixup! reduce max minimap scale
2019-10-14 10:53:34 -07:00
2019-10-11 14:21:06 +02:00
2019-10-14 19:09:32 +02:00
2019-10-10 12:26:28 -07:00
2019-10-10 12:26:28 -07:00
2019-07-14 13:12:54 +02:00
2019-08-27 09:33:19 -07:00
2019-10-10 12:26:28 -07:00
2019-07-02 15:38:23 +02:00
2019-10-14 19:09:32 +02:00
2019-09-19 12:57:04 +02:00
2019-10-09 15:43:19 -07:00
2019-10-02 21:53:12 -07:00
2019-10-14 19:09:32 +02:00

Visual Studio Code - Open Source ("Code - OSS")

Build Status Feature Requests Bugs Gitter

The Repository

This repository ("Code - OSS") is where we (Microsoft) develop the Visual Studio Code product. Not only do we work on code and issues here, we also publish our roadmap, monthly iteration plans, and our endgame plans. This source code is available to everyone under the standard MIT license.

Visual Studio Code

VS Code in action

Visual Studio Code is a distribution of the Code - OSS repository with Microsoft specific customizations released under a traditional Microsoft product license.

Visual Studio Code combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools.

Visual Studio Code is updated monthly with new features and bug fixes. You can download it for Windows, macOS, and Linux on Visual Studio Code's website. To get the latest releases every day, install the Insiders build.

Contributing

There are many ways in which you can participate in the project, for example:

If you are interested in fixing issues and contributing directly to the code base, please see the document How to Contribute, which covers the following:

Feedback

Many of the core components and extensions to Code live in their own repositories on GitHub. For example, the node debug adapter and the mono debug adapter have their own repositories. For a complete list, please visit the Related Projects page on our wiki.

Bundled Extensions

Code includes a set of built-in extensions located in the extensions folder, including grammars and snippets for many languages. Extensions that provide rich language support (code completion, Go to Definition) for a language have the suffix language-features. For example, the json extension provides coloring for JSON and the json-language-features provides rich language support for JSON.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.

S
Languages
TypeScript 75.8%
jsonc 19.8%
CSS 1.2%
JavaScript 0.7%
C 0.7%
Other 1.5%