brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] [CRAZY] CSS font-family hints #3597

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by iwehrman Wednesday May 15, 2013 at 23:53 GMT Originally opened as https://github.com/adobe/brackets/pull/3848


This pull request makes three changes, the first of which is ostensibly innocuous while the latter two of which are probably crazy:

  1. Add font-family values that are directly defined by the CSS specification to CSSProperties.json so that the CSS hinter can provide font-family hints. This is useful because EWF might not be installed, might have failed to load, etc.
  2. Change the CodeHintManager API and implementation (:sunglasses:) so that CodeHintProviders can end the current session and request that the CodeHintManager immediately attempt to begin a new one by querying all the registered providers for hints. This is a non-breaking API change: providers may now return true to signal this in addition to all of their previous options, null, a hint object, or a deferred hint object, for which the semantics have not changed.
  3. Change the CSS hinter to request a session restart when it switches context from property names to property values. As a consequence, if you type font-family: then upon typing the : the provider returns true, hence requesting that the session be restarted. If a higher-priority provider is registered (like, e.g., EWF) then it can take over. Without this change, higher priority providers wouldn't get the opportunity to take over until the lower-priority provider ended the session because it either ran out of hints to provide (which is not the case here) or it inserted a hint (which also wouldn't happen here if the user typed out font-family in full).

Discuss!


iwehrman included the following code: https://github.com/adobe/brackets/pull/3848/commits

core-ai-bot commented 3 years ago

Comment by iwehrman Friday May 17, 2013 at 17:22 GMT


This addresses adobe/brackets-edge-web-fonts#69 and adobe/brackets-edge-web-fonts#104.

core-ai-bot commented 3 years ago

Comment by RaymondLim Saturday May 18, 2013 at 05:50 GMT


Looks good. I verify that your crazy idea does work. Merging.