up

The problem with superscripts and subscripts

When marking up a web page featuring text that requires superscripts or subscripts, we should use the semantically meaningful <sup> and <sub> elements. Examples include footnote references(1) and simple maths 1210=C12.

When browsers come across <sup> and <sub> elements, their user agent stylesheet usually applies rules like this:

sub { 
  vertical-align: sub;
  font-size: smaller;
  line-height: normal;
}

This makes the text smaller and shifts the baseline up or down. There’s two downsides to this. The first is that the baseline shift usually causes anomalous line spacing, that is to say lines are pushed up or down to make space for the sub- or superscript. Secondly the sub/superscripted characters look slightly off – effectively their font weight has been reduced compared with the surrounding text.

Many OpenType fonts ship with properly designed sub- and superscripts. These are specifically designed for the purpose – the glyphs are already small (no change in font size required), retain a comparable weight and have a different shape compared with regular characters, as befits a thoughtfully shrunk down glyph. Even if these characters are available in the current font, browsers will ignore them and continue to synthesise using CSS properties. There are sensible reasons for this, as we shall see.

It is very easy to get browsers to swap in the OpenType glyphs instead – just use the font-variant-position property. For browsers which support it (all modern ones) you can override the user agent stylesheet and implement font-variant-position as follows:

@supports ( font-variant-position: sub ) {
  sub {
    vertical-align: baseline;
    font-size: 100%;
    line-height: inherit;
    font-variant-position: sub;
  }
}

But there’s a potential problem. What happens if the characters in the text you need to superscript are not all available as OpenType alternates in the current font? According to the CSS Fonts Module Level 4 specification, browsers should synthesise the whole superscript, even if some characters are available as proper superscripts:

Because of the semantic nature of subscripts and superscripts, when the value [of font-variant-position] is either sub or super for a given contiguous run of text, if a variant glyph is not available for all the characters in the run, simulated glyphs should be synthesised for all characters using reduced forms of the glyphs that would be used without this feature applied.

Phew. Job done. You’d have thought. Unfortunately at the time of writing only Firefox supports this behaviour; WebKit and Chromium do not. If the webfont has loaded, the font you are currently reading contains the following superscript alternates: 0123456789(). That is to say no letters or other characters except the numbers 0–9 and a pair of parentheses. Now let’s consider the following markup:

2a<sup>2</sup> a<sup>2a</sup> a<sup>(2)</sup>
a<sup>(2a)</sup> a<sup>[2]</sup>

The superscripts vary, in that some of them contain characters which are all available, and others contain a mixture. The text should render like this:

Screenshot from Firefox 129b/Mac

This is how it renders in the browser you are currently using:

2a2 a2a a(2) a(2a) a[2]
As currently rendered in your browser

The chances are that none of the ‘a’s or square brackets are superscripted at all. I’ve filed this as a bug in Chromium and Webkit. I’ve also asked that font-variant-position be removed from Baseline until these bugs are fixed, as support is evidently incomplete, but also because that lack of support is harmful to the visual semantics, in other words it could change the intention and meaning of the text.

Finally I’ve proposed that full support for font-variant-position is included in Interop 2025. If you want to see this happen give my proposal some love.

Read or add comments




up

Ealing beat Saracens in Premiership Rugby Cup

Championship highfliers Ealing beat Premiership side Saracens 29-19 in the opening round of the Premiership Rugby Cup.




up

Earthy earns maiden England U21 call-up

Bristol City midfielder George Earthy called up to the England Under-21 squad for the first time after a series of withdrawals due to either injury or transitions into the senior squad.





up

This Cinema's Screening The Muppet Christmas Carol Every Day In December Up To Xmas Eve

41 times in all.






up

News roundup: deck.js, Yahoo Kills off Maps API, Patterns for Large-Scale JavaScript Application Architecture

Listen to this week's podcast (September 9, 2011) Patterns For Large-Scale JavaScript Application Architecture Patterns For Large-Scale JavaScript Application Architecture is a lengthy article by Addy Osmani detailing some basic principles of writing a large-scale JavaScript application. It's inspired by a classic Nicholas Zakas talk outlining some of the same principles ...




up

News roundup: JavaScript under attack!

Listen to this week's podcast (Podcast edit: I mistakenly mention Respond.js, which is actually a media query polyfill - I'm actually talking about Responsive images) Google Dart By far the biggest news of the week isn't JavaScript, but rather a language called Dart (formerly Dash?), which certain factions within Google hope will replace ...




up

News roundup: Node causes cancer, node cures cancer!

This week's podcast (I was hoping to keep it short, but I kept talking and talking... sorry!) Libraries, frameworks, and code Cube - open-source visualization for time series data chainvas - chaining sugar for Canvas JS-Forth: Forth Interpreter in JavaScript when.js is a lightweight Promises and when() implementation (from CommonJS) MongoSpy is a MongoDB monitor that ...




up

News roundup: I Like Eich. 140 byte synthesizer, An End To Negativity, Sencha Touch 2.0, Dart (again)

Listen to this week's podcast (October 29, 2011) (23:05 minutes) I'm trying a little something different this week. I hope you guys like pictures. :) Brenden Eich + "I Like Ike" mashup by @lonnen 140 byte synthesizer A while back Jed Schmidt created a simple little project on GitHub called 140 bytes ...




up

News roundup: 11-11-11! insertAdjacentHTML, classes in JavaScript?, twilight of Flash and Silverlight, Yahoo! Cocktails

Listen to the podcast for November 11, 2011 insertAdjacentHTML Mozilla has a nice overview of insertAdjacentHTML, a DOM function that's intended to supplement innerHTML. It's a bit less destructive and plays nicely with content that's already in the DOM. For instance, whereas innerHTML completely blows away whatever is inside the ...




up

News roundup: tons o’ links for the New Year

Hello there, it's been a while! Oh dear, another year has passed. And it seems that I've been stocking up a year's supply of JavaScript tidbits to dump on the unsuspecting populace! Ok, not quite, but I do have quite a backlog, that's somewhat in chronological order, ...




up

News roundup: iOS Orientationchange Fix, JavaScript Patterns, jQ.Mobi

Listen to this week's podcast (January 20, 2012)! iOS Orientationchange Fix jQuery Mobile's Scott Jehl has released iOS-Orientationchange-Fix (read his blog post). This has been a persistent annoyance on iOS since its release. You may be familiar with the mobile viewport tag, which allows you to properly fit sites to ...




up

News roundup: Enyo.js, Jed, HTML5 Please, WAT

Listen to this week's news roundup (January 30, 2012) I really should have named today's update "Planes, Trains and Automobiles", since those were all involved with my commute this unusual morning! This week's podcasts is surely enough recorded from SFO Airport, so I hope you enjoy the atmosphere and the ...




up

News roundup: psd.js, turn.js, Ryan Dahl steps down from Node.js

Listen to this week's podcast (February 6, 2012) psd.js psd.js is the beginnings of a Photoshop PSD parser in JavaScript! Right now it only essentially extracts metadata information - such as image size and layer information - but it's off to a good start! You can even drag and drop ...




up

News roundup: Chrome for Android, ASCII Fluid Dynamics, Node.js: doing life wrong?

(no podcast this week - Boo! Check back next week) Chrome for Android Google has just released a beta of Chrome for Android, which is available for those running Android Ice Cream Sandwich (aka "the 1%"). This isn't JavaScript-specific news per se, but it is HUGE news for web devs ...




up

Teams “welcome freedom” offered by revised 2026 regulations | RaceFans Round-up

In the round-up: Teams "welcome freedom" of 2026 regulations • Alpine targets Colapinto - reports • Pulling quickest in Formula E test



  • RaceFans Round-up

up

Prospects for South Americans pursuing F1 “getting better” – Colapinto | RaceFans Round-up

In the round-up: F1 hopes for South Americans "getting better" • Verschoor back to MP for fifth F2 season • Verstappen races in charity event



  • RaceFans Round-up

up

New Aston Martin simulator ‘like something from Star Wars’ – Krack | RaceFans Round-up

In the round-up: New simulator 'like Star Wars' - Krack • Pirelli likes 'flexibility' of new C6 • Play NZ anthem when McLaren wins - Lawson



  • RaceFans Round-up

up

Monza crash ‘made me mentally stronger’ – Antonelli | RaceFans Round-up

In the round-up: Monza crash 'made me stronger'- Antonelli • Perez staying at Red Bull - reports • Esterson fills empty Trident F2 seat



  • RaceFans Round-up
  • Andrea Kimi Antonelli

up

Alpine must make up for 0.3-second deficit with 2025 chassis – Briatore | RaceFans Round-up

In the round-up: Alpine must make up for 0.3-second deficit with 2025 chassis - Briatore • Stolen Lauda helmet goes on display • Wittich 'has not resigned'




up

Adding structured data support for Product Variants

In 2022, Google expanded support for Product structured data, enabling enhanced product experiences in Google Search. Then, in 2023 we added support for shipping and returns structured data. Today, we are adding structured data support for Product variants, allowing merchants to easily show more variations of the products they sell, and show shoppers more relevant, helpful results. Providing variant structured data will also complement and enhance merchant center feeds, including automated feeds.




up

What web creators should know about our March 2024 core update and new spam policies

Today we announced the March 2024 core update. This is designed to improve the quality of Search by showing less content that feels like it was made to attract clicks, and more content that people find useful. We also shared that we have new spam policies to better handle the practices that can negatively impact Google's search results. In this post, we'll go into more detail for creators about both the update and the spam policies.




up

Adding markup support for organization-level return policies

We're adding support for return policies at the organization level, which means you'll be able to specify a general return policy for your business instead of having to define one for each individual product you sell.




up

What to know about our August 2024 core update

This post announces the August 2024 core update to Google Search. This update is designed to continue our work to improve the quality of our search results by showing more content that people find genuinely useful and less content that feels like it was made just to perform well on Search.




up

Supporting AVIF in Google Search

Over the recent years, AVIF has become one of the most commonly used image formats on the web. We're happy to announce that AVIF is now a supported file type in Google Search, for Google Images as well as any place that uses images in Google Search. You don't need to do anything special to have your AVIF files indexed by Google.




up

SDL Trados Studio ? Corrupt file: Missing locked content for Oasis.Xliff 12.x.

I recently accepted a large proofreading job to be completed in SDL Trados Studio 2014. All seemed to be fine until I tried to open some of the project files. This article describes how to deal with “Corrupt file: Missing … Continue reading




up

Cricket World Cup - kudos to Sri Lanka Cricket

I had the fortune of landing a ticket for Saturday's quarter final match between Sri Lanka and England. Someone who had 2 grandstand tickets got sick and I was lucky to be asked whether I want it at list price :). At Rs. 4000 each I felt they were pricey but then at the event I met a friend who had paid double that for his ticket! I will comment on the ticket selling process later.

First of all, the stadium atmosphere was just incredibly amazingly fantastically electric and rocking. Being there is nothing like watching at home .. despite being able to see the match poorly, the environment is of course unbeatable. The fact that Sri Lanka gave England a total drubbing was awesome, even though as a result the game became quite non-competitive .. but I'll settle for non-competitive games up to the final and thrilling victory in the final (vs. to have it stolen like the last time).

This post is not about the quarter final match - its about Sri Lanka Cricket, the embattled organization which runs the sport in Sri Lanka.

As most people in Sri Lanka know, the organizers were hammered very very hard in the press before the World Cup started about their preparations, about how the stadiums were completed last minute and about every aspect of team selection to overall management. I'm not an expert on cricket- so I have no useful views on the cricketing aspects and will leave them alone. However, I do want to comment on the overall organization of the event.

I have made it to 3 matches in Colombo - the first was the loss to Pakistan, the second the rained out draw with Australia and the third of course the drubbing of England.

All these were held at the newly refurbished Kettarama Stadium of course- an absolutely AWESOME stadium now! I have been there a few months ago and it was a nightmare to get in and out. Now its a breeze and reminds me of the convenience of getting in and out of Purdue's Mackey Arena (for basketball). Once you are inside, the view is breathtaking. The atmosphere is amazingly electric. Every match was sold out (of course) to a capacity crowd of 35,000+.

I didn't make it to Hambantota for the first match but the news from there was that the brand new stadium there was absolutely amazing as well. The words from a friend (usually a skeptic) was "money well spent".

Same has to be said for Pallekalle in Kandy. That's again a new stadium (or a refurb'ed old ground; not sure) and while its not as built up as Hambantota or Colombo the location is just amazing and all the reports are that the place was fantastic.

There was not a single time in all the matches in Sri Lanka where something went wrong with the logistics. All the comentators have been giving kudos about the venues and the amazing environments offered by them.

I too was caught up in the press vendetta against Suraj Dandeniya (the head of the World Cup organizing team in SLC). While the work was indeed completed last minute it is time to give this gentleman a tip of the hat and acknowledge the amazing work they have done to deliver perfectly for Sri Lanka. Press  stories have a way of finding individuals guilty without judge or jury and this vendetta was played out by most of the newspapers in a merciless manner. Maybe Suraj has refused some passes for the press and their buddies? Who knows.

Yes yes I know there's one more match to be played in Sri Lanka. That's the one where Sri Lanka will whack the New Zealanders home :-). I am confident that too will go off without a hitch! At one level "may the best team win" may apply but, honestly, to hell with that .. Sri Lanka has to win to set up an amazing final in India against (most probably) India. Nothing like that victory!

(The NZ team has done amazingly well to get to the semi-finals and they've always stepped up big at the big occasions. Their country also suffered a massive earthquake recently .. only to be overshadowed by an even bigger one. If they go on to winning the tournament they'll again get some all-important PR for the recovery efforts there. To that extent I want NZ to win. Yeah, treacherous.)

Now about those ticket sales.

Fundamentally, this is a no-win situation for the organizers. 35,000 tickets for the match where 500,000 at least would love to watch in person. So no matter what approach is taken, there will be 465,000+ who will be crying foul!

There have been stories about how people stood in line, bought the ticket and turned around and sold it to someone else. I see no way to stop that - and keeping the ticket price low (lowest was Rs. 50 for group stage matches in Colombo) meant that anyone could buy them without any problem - a good thing in general.

Personally I have no issue with blackmarket sales (and I don't understand why they are banned) - the only problem it highlights is that the original ticket was sold too low! Why doesn't Sri Lanka Cricket sell the ticket for Rs. 10,000 if it can get away with it and make more money? Maybe they should've also set up an auction at EBay or something where people can bid and buy tickets at whatever price above the minimum price. No I'm not suggesting doing that for all tickets but rather for a percentage- you give some on a pure lottery, some for those who stand in line .. and the rest to the best price via auction with batches sold daily. I don't understand why they created a secondary market in the first place when they themselves could've run both the primary and secondary markets. Obviously I don't know enough about market economics.

The real problem is that many tickets seem to have been sold only to "known parties". The Colombo powers-that-be who want to watch the matches shouldn't have been able to buy through back channels. If they don't want to stand in line they can certainly afford to buy the tickets on the blackmarket if they want and let some poor guy make some money. Why should these fat cats be able to buy tickets at list?!

When you are at the match (and I went to A lower the first time (Rs. 250), to C upper the second time (Rs. 100) and to the grand stand for the quarter final (Rs. 4000) its clear that most in attendance were way above average in economic terms. In practical terms, that suggests that a lot of blackmarket sales were happening. If someone's a true fan, there's no amount of money that would make them sell the ticket - so the people who sold the tickets were not real fans. Or they were true fans who felt the money was more economically valuable for them than the experience (maybe they had a sick child or needed some home repairs or whatever ..). Or they were savvy businessmen who stood in line and sold the ticket for a profit. The bottom line is that there's no way to prevent normal capitalism from taking place and the value balance ending up wherever it ends up.

So while I too am frustrated I can't get a ticket for the semi-finals, I am only upset about connected people getting tickets at list price through backchannel means. The rest of the system I have no concerns with - and next time (20-20 World Cup next year) I hope Sri Lanka Cricket does a combination of lines, lotteries and auctions to sell the tickets.

Talking about tickets .. anyone have a spare grandstand ticket for the semi final they want to sell me at list price? :-)





up

LaSca: a Large Scale Group Decision Support System

Decision-making involves choosing between one ore more alternatives, to achieve one or more goals. To support this process, there are decision support systems that employ different approaches, supporting groups or not. Generally, however, these systems do not have great flexibility; their users have to follow preestablished decision methods. This paper, after exposing some decision-making processes, describes a system, LaSca (from Large Scale), to support decisions in large-scale groups. This system, besides allowing effective achievement of the benefits of deciding in large groups through the proper structuring of the group, also allows its users to define themselves how this structuring will happen, based or not in the existing theories on the subject. So, in addition to facilitate the decision-making process, LaSca also allows its users to decide how to decide.




up

Markup upon Video - towards Dynamic and Interactive Video Annotations

Interactive video is increasingly becoming a more and more dominant feature of our media platforms. Especially due to the popular YouTube annotations framework, integrating graphical annotations in a video has become very fashionable these days. However, the current options are limited to a few graphical shapes for which the user can define as good as no dynamic behaviour. Despite the enormous demand for easy-creatable, interactive video there are no such advanced tools available.

In this article we describe an innovative approach, to realize dynamics and interactivity of video annotations. First we explain basic concepts of video-markup like the generic element model and visual descriptors. After that we introduce the event-tree model, which can be used to define event-handling in an interactive video formally as well as visually. By combining these basic concepts, we can give an effective tool to the video community for realizing interactive and dynamic video in a simple, intuitive and focused way.




up

Ontology-based Competency Management: the Case Study of the Mihajlo Pupin Institute

Semantic-based technologies have been steadily increasing their relevance in recent years in both the research world and business world. Considering this, the present article discusses the process of design and implementation of a competency management system in information and communication technologies domain utilizing the latest Semantic Web tools and technologies including D2RQ server, TopBraid Composer, OWL 2, SPARQL, SPARQL Rules and common human resources related public vocabularies. In particular, the paper discusses the process of building individual and enterprise competence models in a form of ontology database, as well as different ways of meaningful search and retrieval of expertise data on the Semantic Web. The ontological knowledge base aims at storing the extracted and integrated competences from structured, as well as unstructured sources. By using the illustrative case study of deployment of such a system in the Human Resources sector at the Mihajlo Pupin Institute, this paper shows an example of new approaches to data integration and information management. The proposed approach extends the functionalities of existing enterprise information systems and offers possibilities for development of future Internet services. This allows organizations to express their core competences and talents in a standardized, machine processable and understandable format, and hence, facilitates their integration in the European Research Area and beyond.




up

Coup d'envoi de la saison des carnavals à Cologne en Allemagne

Coup d'envoi de la saison des carnavals à Cologne en Allemagne




up

No Comment : l'éruption d'un volcan cloue les avions au sol à Bali

No Comment : l'éruption d'un volcan cloue les avions au sol à Bali









up

Last supermoon of 2024 to shine over Central Alberta this week - Central Alberta Online

  1. Last supermoon of 2024 to shine over Central Alberta this week  Central Alberta Online
  2. 4 of 4: Last supermoon of the year to light up Canadian skies  Global News Toronto
  3. Beaver Moon 2024: See the final 'supermoon' of the year rise next to the 'Seven Sisters'  Livescience.com
  4. See 2024’s Final ‘Supermoon’ And ‘Fireballs’: The Night Sky This Week  Forbes
  5. How and when to catch the last supermoon of 2024  National Post






up

UN chief warns COP29 summit to pay up or face climate-led disaster for humanity - The Globe and Mail

  1. UN chief warns COP29 summit to pay up or face climate-led disaster for humanity  The Globe and Mail
  2. Climate Summit, in Early Days, Is Already on a ‘Knife Edge’  The New York Times
  3. At COP29 summit, nations big and small get chance to bear witness to climate change  The Globe and Mail
  4. Terence Corcoran: COP29 hit by political ‘dunkelflaute’  Financial Post
  5. COP29: Albania PM goes off script to ask 'What on Earth are we doing?'  Euronews




up

Paris : Imaginons les Places de demain. Et si on s’occupait des rues d’aujourd’hui ?

A gauche, Barbès. A droite, la nouvelle Place du Panthéon. Aux mêmes heures !
C’est une vaste opération lancée depuis 2015 par la Mairie de Paris. «Donner plus de place à celles et ceux qui ont envie de vivre dans une ville plus pacifiée, avec moins de voitures et moins de stress» selon les mots d'Anne Hidalgo. Sept grandes places parisiennes vont être « réinventées » : ...




up

Insurrection à Washington - Assaut du Capitole: des membres de la milice Oath Keepers reconnus coupables de "sédition"

(Belga) Quatre membres de la milice d'extrême droite "Oath Keepers" ont été reconnus coupables lundi de sédition pour leur rôle dans l'assaut du Capitole, à l'issue du second procès organisé sur ce chef d'accusation extrêmement rare.

Depuis l'attaque du 6 janvier 2021, plus de 950 partisans de l'ex-président républicain Donald Trump ont été arrêtés et inculpés pour avoir semé le chaos dans le siège de la démocratie américaine. Parmi eux, seuls 14 militants de groupuscules d'extrême droite - neuf membres des "Oath Keepers" et cinq "Proud Boys" - ont été accusés de "sédition", un chef passible de 20 ans de prison qui implique d'avoir planifié l'usage de la force pour s'opposer au gouvernement. Faute de place suffisante dans le tribunal fédéral de Washington, la justice a organisé le procès des Oath Keepers, accusés de s'être entraînés et armés pour l'occasion, en deux temps. Un premier procès s'est conclu fin novembre par un verdict mitigé: le fondateur de cette milice, Stewart Rhodes, et un responsable local ont été déclarés coupables de sédition, mais leurs trois co-accusés ont été acquittés sur ce chef. Lundi, à l'issue du second procès, les jurés ont jugé coupables les quatre derniers Oath Keepers, des hommes âgés de 38 à 64 ans décrits comme de dangereux "traîtres" par l'accusation, mais comme des "fanfarons" par leurs avocats. Le procès des Proud Boys, dont leur leader Enrique Tarrio, s'est ouvert en décembre et était toujours en cours lundi, dans le même tribunal. (Belga)




up

Le ministre de la justice, Eric Dupont-Moretti, a oubliᅵ de dᅵclarer 300 000 euros de revenus au fisc

Voilᅵ un "petit oubli" bien embᅵtant. Selon Mediapart, "le garde des Sceaux, Eric Dupont-Moretti, a oubliᅵ de dᅵclarer au fisc et ᅵ la Haute Autoritᅵ pour la transparence de la vie publique...




up

Study on operational risks and preventive measures of supply chain finance

The operation of supply chain finance faces various risks, therefore, studying the operational risks of supply chain finance and corresponding preventive measures is of great significance. Firstly, classify the types of operational risks in supply chain finance. Secondly, based on the risk classification results, the decision tree method is used to evaluate the operational risks of supply chain finance. Finally, based on the risk assessment results, targeted risk prevention measures for supply chain finance operations are proposed, such as strengthening supplier management, optimising logistics and warehouse management, risk analysis and monitoring, and strengthening information security and data protection. The case analysis results show that the accuracy of the evaluation results of this method is higher, and the risk coefficient has been significantly reduced after applying this method, indicating that it can effectively reduce supply chain risk.




up

Springs of digital disruption: mediation of blockchain technology adoption in retail supply chain management

Supply chain management practices are vital for success and survival in today's competitive Indian retail market. The advent of COVID-19 pandemic necessitates a digital disruption in retail supply chain management centred on efficient technology like blockchain in order to enhance supply chain performance. The present research aims to decipher the nature of associations between supply chain management practices, blockchain technology adoption and supply chain performance in retail firms. The research is based on primary survey of specific food and grocery retailers operating on a supermarket format stores in two Indian cities. The findings pointed towards the presence of significant and positive association of all the constructs with each other. Moreover, the mediating role of blockchain technology adoption was also revealed, i.e., it partially mediates the effects of supply chain management practices on supply chain performance.




up

Ebullient supervision, employee engagement and employee commitment in a higher education institution: the partial least square approach

The study investigated the influence of ebullient supervision on employee commitment in a Ghanaian public university through the mediating role of employee engagement. The simple random sampling technique was used to draw 302 administrative staff of the university to respond to the self-administered questionnaire on the constructs. Furthermore, the partial least square structural equation technique was deployed to test the research hypotheses in the study. The results showed that ebullient supervision had a significant positive relationship with employee commitment and employee engagement. The findings further revealed that employee engagement positively correlated with employee commitment. Finally, the study's findings established that employee engagement partially mediated the link between ebullient supervision and employee commitment. The study emphasised that various supervisors in a university's administration should create an environment that favours fun where subordinates can form ties with one another.