adobe / brackets-edge-web-fonts

Edge Web Fonts extension for Brackets. Simply unzip and drop into your Brackets extension folder to browse and include Edge Web Fonts.
http://html.adobe.com/edge/webfonts/
MIT License
50 stars 20 forks source link

Entries in code hint list should retain their case #8

Open njx opened 12 years ago

njx commented 12 years ago
  1. Open the file at this gist: https://gist.github.com/518bf8731482032a7510
  2. Put the cursor after font-family: in the p rule
  3. Hit Ctrl-Space

Actual result: All the fonts are listed in lowercase even though some of them are capitalized in the file. Expected result: Fonts should be listed with the case used in the file.

joelrbrandt commented 12 years ago

Fixing this is slightly complicated, since font slugs are case insensitive BUT EWF include urls are not case insensitive (at least according to the spec). This means that we need to convert everything to lowercase for the include generation, but not for the popup generation.

Furthermore, if the file contains "foo" and "Foo" font slugs (which are identical), we only want to list one of them. It probably doesn't matter which one we show though.

The right way to fix this is probably to add a flag to the lowerSortUniqStringArray function that says whether to force the output array to be all lowercase or not. We'd still always want to do case-insensitive comparisons for the "uniq" part.

couzteau commented 11 years ago

related https://github.com/adobe/brackets-edge-web-fonts/issues/70