Module talk:Unicode chart: Difference between revisions

Content deleted Content added
Info panel demo: show general category instead?
comments about cell widths, fonts
Line 100:
I'm prepared to go with #4 for now, then upgrade to #5–6 only after all the other issues are addressed. ―[[special:contributions/cobaltcigs|cobaltcigs]] 09:17, 12 September 2019 (UTC)
:I've never been very keen on specifying fonts on the Wikipedia side, because 1) most fonts for most Unicode scripts are not available on most users devices without downloading them; 2) in the past editors have tended to specify fonts that they have on their own system so that it looks nice for them, without considering other users; and 3) the Wikipedia specified fonts may override users' font preferences set in their browser (or in Wikipedia settings). Personally I would rather not specify any fonts, and leave it to the user's browser to apply an appropriate font, but I know that this is a minority view, so I'm OK with your suggested solution. [[User:BabelStone|BabelStone]] ([[User talk:BabelStone|talk]]) 13:06, 12 September 2019 (UTC)
::My understanding was that [[Internet Explorer|certain browsers]] would show the little squares even if a suitable font was installed, unless specifically told to use that font. I have no idea whether this is (still?) accurate. I suppose could add a parameter like <code>fonts=off</code>. Then we could ask several Windows users whether all the charts look okay with no fonts specified. ―[[special:contributions/cobaltcigs|cobaltcigs]] 19:04, 16 September 2019 (UTC)
 
==Formatting abbreviations==
Line 150 ⟶ 151:
 
::*"assigned" is the default phrase returned when a character in question is not "control", "format", <s>"surrogate", "private-use", "unassigned",</s> "space-separator", "line-separator", or "paragraph-separator". The struck-out categories will probably never be part of any chart, which leaves five that are potentially interesting.
::*{{done}} Making the chart stay continuously at <code>width: 100%;</code> would probably help. Setting th 8% and td 5.75% would add up to same, and might also be helpful.
::*I've got it loading named character entity references from a subpage in addition to calculating the numeric ones, which is probably the single crowdpleasingest information here. The UTF-8 is of interest to the extent that it's what our urlencoding uses (Δ is 0xCE 0x94 and [[%CE%94|%CE%94]]). UTF-16 less so, but I thought about it.
;;*{{removed}} The [[mojibake]] depiction of these bytes as separate chars was slightly helpful when debugging but not meant as a serious feature.
::―[[special:contributions/cobaltcigs|cobaltcigs]] 10:13, 16 September 2019 (UTC)
: Nice method – I was surprised that it could be done without JavaScript! Maybe instead of the values from [[Module:Unicode data/control]], which include only some of the General Categories, the table could show the long name of the actual General Category. (The long names would have to be added to [[Module:Unicode data/category]].) — [[User:Erutuon|Eru]]·[[User talk:Erutuon|tuon]] 10:37, 16 September 2019 (UTC)
 
::It relies upon the css [https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors/Using_the_:target_pseudo-class_in_selectors <code>:target</code>] selector to show/hide the panel for any given codepoint. I think this would be nearly adequate if not for the vertical anchor-jumping. I suppose moving the info panel to the top (below the pdf link and above the column headers) would make it slightly less annoying, but it would look weird. Another consequence of this is that whenever multiple charts are present on the same page, opening an info panel on one chart will close info panels all others. So using Javascript would probably be better. It would only require convincing the right people that feature is worthwhile and too app-like.
::For now I've reduced the size of the bold-face character name from 125% to 110%, set the root <code>table</code> element to full page-width, and set the columns to fixed percentages that add up to 100%.
::I've also [[Special:Diff/916051317|removed the 'Amiri' font]] from the <code>.script-Arab</code> css class, because it makes the U+FDFD ligature wide enough to make these percentages meaningless. I don't know if other characters are similarly affected. I'll need to install the first three fonts to test whether they have the same problem (or, indeed, others).
::―[[special:contributions/cobaltcigs|cobaltcigs]] 19:04, 16 September 2019 (UTC)