GithubHelp home page GithubHelp logo

Comments (8)

zadjii-msft avatar zadjii-msft commented on June 24, 2024 1

Unanimous team consent: It's just easier to add builtin glyph support to d2d rather than finagle the SUI to support this

from terminal.

github-actions avatar github-actions commented on June 24, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

from terminal.

o-sdn-o avatar o-sdn-o commented on June 24, 2024

It seems that despite the fact that Direct2D provides graphics acceleration, builtin glyphs are not activated in this mode. If this is intended, then it would probably be worth rephrasing the "Builtin Glyphs On/Off" option description, specifically indicating the need for "Direct3D".

// _p.s->font->builtinGlyphs is the setting which decides whether we should map box drawing glyphs to
// our own builtin versions. There's just one problem: BackendD2D doesn't have this functionality.
// But since AtlasEngine shapes the text before it's handed to the backends, it would need to know
// whether BackendD2D is in use, before BackendD2D even exists. These two flags solve the issue
// by triggering a complete, immediate redraw whenever the backend type changes.
//
// The proper solution is to move text shaping into the backends.
// Someone just needs to write a generic "TextBuffer to DWRITE_GLYPH_RUN" function.
bool _hackIsBackendD2D = false;
bool _hackWantsBuiltinGlyphs = true;
bool _hackTriggerRedrawAll = false;

switch (graphicsAPI)
{
case GraphicsAPI::Direct2D:
_b = std::make_unique<BackendD2D>();
_hackIsBackendD2D = true;
break;
default:
_b = std::make_unique<BackendD3D>(_p);
_hackIsBackendD2D = false;
break;
}
// This ensures that the backends redraw their entire viewports whenever a new swap chain is created,
// EVEN IF we got called when no actual settings changed (i.e. rendering failure, etc.).
_p.MarkAllAsDirty();
const auto hackWantsBuiltinGlyphs = _p.s->font->builtinGlyphs && !_hackIsBackendD2D;
_hackTriggerRedrawAll = _hackWantsBuiltinGlyphs != hackWantsBuiltinGlyphs;
_hackWantsBuiltinGlyphs = hackWantsBuiltinGlyphs;

from terminal.

lhecker avatar lhecker commented on June 24, 2024

Right... I wrote that "This feature only works when GPU Acceleration is available." text before I added the Graphics API setting (at which time that statement was mostly true), but now that doesn't work anymore of course. The question is, which one is best?

  • This feature is only available when the Direct3D Graphics API is used.
  • This feature is unavailable when the Direct2D Graphics API is used.
  • This feature is unavailable when Direct2D is used for text rendering.
  • something else?

from terminal.

o-sdn-o avatar o-sdn-o commented on June 24, 2024

It seems to me that since the "Builtin Glyphs" option is completely dependent on the "Graphics API" option, it makes sense to make it a sub-option of the "Graphics API" option that becomes available when "Direct3D 11" is selected.

I don't think the "Builtin Glyphs" option should necessarily be per-profile, as a global option it is quite appropriate for me.

from terminal.

zadjii-msft avatar zadjii-msft commented on June 24, 2024

Oof that's a tricky one. Cause I'd expect it on the appearance page, but the renderer option doesn't really need to be on the appearance page. That's definitely an advance option.

Maybe when d2d is enabled, we could disable the builtin glyphs menu item, and add a message box with a deeplink to the advanced page... but that sounds overly complicated.

I guess making it a sub-item of the renderer entry is probably the most elegant solution

from terminal.

lhecker avatar lhecker commented on June 24, 2024

I suspect most people will keep it on the default option "Automatic", in which case Direct2D is only used if the system lacks a GPU (or it's a very old GPU, but that's fairly rare nowadays). This is commonly the case when using RDP to remote into a server or VM.

The reason I put the "Builtin Glyphs" option on the profile appearance page is because the font setting is per-profile and so I guess the builtin-glyph option (which overwrites glyphs in the font) should be per-profile too.

The problem is that the settings UI doesn't really have any idea about this "Automatic" API choice. It could be hooked up of course, but I think that's somewhat annoying to do (different DLLs, with different components, on different threads, and it may change at any given moment = needs event hooks). The upside on the other hand is potentially fairly small, because >95% of users are using the Direct3D renderer anyway.

Unless Dustin/Mike think about this differently, I think I'll only change the sub-text on the setting for now. If more people run into this issue (even just a few), I'll try to improve it by hooking up the render thread to the settings UI, or something similar.

from terminal.

tusharsnx avatar tusharsnx commented on June 24, 2024

I'd love those specific feature toggles to get grayed out when the feature is unavailable for any reason. We could give additional context as to why they're grayed out with a ⓘ button treatment to the grayed-out toggles.

image

from terminal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.