documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Greek characters in circuit drawings creating alignment problems

Open abbycross opened this issue 2 years ago • 2 comments

URL to the relevant documentation

Once the page is live, the URL will be https://docs.quantum-computing.ibm.com/verify/simulate-with-qiskit-primitives (will merge in this PR)

Please describe the UI problem.

Circuit drawings on this page aren't completely aligned correctly. Under Parameterized circuit with Estimator, the drawing in the old Qiskit docs shows this Screenshot 2023-10-17 at 1 11 00 PM

But in our docs it shows as this Screenshot 2023-10-17 at 1 12 03 PM

The problem seems to be the theta character.

The problem is similar in the analogous Sampler section Screenshot 2023-10-17 at 1 12 52 PM

abbycross avatar Oct 17 '23 17:10 abbycross

This is an issue bc ibm plex doesnt have a font for greek characters, so in browser it defaults to a different font which throws off the spacing

javabster avatar Apr 26 '24 14:04 javabster

From Abby's screenshot, it seems the old Qiskit docs used a fallback with the correct spacing. We might be able to find that font and use it here.

frankharkins avatar Apr 26 '24 14:04 frankharkins

This is now fixed through changes in closed source.

Screenshot 2024-05-30 at 3 29 57 PM

There were two issues:

  1. For QuantumCircuit.draw(), Qiskit returns both HTML and plain text. The app was preferring the HTML, but its formatting doesn't work well with the web app. We now use the plain text
  2. Next.js was using a fallback font of Arial for characters that aren't in IBM Plex Mono. We turned that off and now fallback to a monospace font.

Eric-Arellano avatar May 30 '24 19:05 Eric-Arellano