* bug#73417: 30.0.90; SVG text color on dark background
@ 2024-09-22 7:25 Augusto Stoffel
2024-09-22 7:58 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Augusto Stoffel @ 2024-09-22 7:25 UTC (permalink / raw)
To: 73417
[-- Attachment #1: Type: text/plain, Size: 328 bytes --]
When I open the attached SVG files in Emacs with a dark background
theme, I notice that the text color "adapts" to the theme and becomes
white. This works nicely (but see below) when the SVG has a transparent
background (example on the right), but renders unreadable a SVG with
regular white background (example on the left).
[-- Attachment #2: emacs.png --]
[-- Type: image/png, Size: 49060 bytes --]
[-- Attachment #3: Type: text/plain, Size: 103 bytes --]
If I embed the SVGs on a simple HTML, the text color is not influenced
by the HTML background color:
[-- Attachment #4: firefox.png --]
[-- Type: image/png, Size: 23216 bytes --]
[-- Attachment #5: Type: text/plain, Size: 675 bytes --]
I would argue that Emacs should the same behavior as web browsers, for 2
reasons:
- While it might seem nice to adapt text color to the surroundings, note
that the right-hand side example is in Emacs is still problematic, since
one can't really see the black square frame around the blue plot.
- It would be hard to argue with any SVG producer that their SVGs are
broken if browsers display them just fine.
For reference, here are the SVGs, which by the way where generated with
Python's matplotlib library as follows:
```
import matplotlib.pyplot as plt
plt.plot([1,2]); plt.savefig("x-white.svg")
plt.plot([1,2]); plt.savefig("x-transparent.svg", transparent=True)
```
[-- Attachment #6: x-white.svg --]
[-- Type: image/svg+xml, Size: 11512 bytes --]
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="460.8pt" height="345.6pt" viewBox="0 0 460.8 345.6" xmlns="http://www.w3.org/2000/svg" version="1.1">
<metadata>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2024-09-22T08:55:04.570451</dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:creator>
<cc:Agent>
<dc:title>Matplotlib v3.9.2, https://matplotlib.org/</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<defs>
<style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M 0 345.6
L 460.8 345.6
L 460.8 0
L 0 0
z
" style="fill: #ffffff"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 57.6 307.584
L 414.72 307.584
L 414.72 41.472
L 57.6 41.472
z
" style="fill: #ffffff"/>
</g>
<g id="matplotlib.axis_1">
<g id="xtick_1">
<g id="line2d_1">
<defs>
<path id="m1c080dd210" d="M 0 0
L 0 3.5
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#m1c080dd210" x="73.832727" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_1">
<!-- 0.0 -->
<g transform="translate(65.881165 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-30" d="M 2034 4250
Q 1547 4250 1301 3770
Q 1056 3291 1056 2328
Q 1056 1369 1301 889
Q 1547 409 2034 409
Q 2525 409 2770 889
Q 3016 1369 3016 2328
Q 3016 3291 2770 3770
Q 2525 4250 2034 4250
z
M 2034 4750
Q 2819 4750 3233 4129
Q 3647 3509 3647 2328
Q 3647 1150 3233 529
Q 2819 -91 2034 -91
Q 1250 -91 836 529
Q 422 1150 422 2328
Q 422 3509 836 4129
Q 1250 4750 2034 4750
z
" transform="scale(0.015625)"/>
<path id="DejaVuSans-2e" d="M 684 794
L 1344 794
L 1344 0
L 684 0
L 684 794
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_2">
<g>
<use xlink:href="#m1c080dd210" x="138.763636" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_2">
<!-- 0.2 -->
<g transform="translate(130.812074 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-32" d="M 1228 531
L 3431 531
L 3431 0
L 469 0
L 469 531
Q 828 903 1448 1529
Q 2069 2156 2228 2338
Q 2531 2678 2651 2914
Q 2772 3150 2772 3378
Q 2772 3750 2511 3984
Q 2250 4219 1831 4219
Q 1534 4219 1204 4116
Q 875 4013 500 3803
L 500 4441
Q 881 4594 1212 4672
Q 1544 4750 1819 4750
Q 2544 4750 2975 4387
Q 3406 4025 3406 3419
Q 3406 3131 3298 2873
Q 3191 2616 2906 2266
Q 2828 2175 2409 1742
Q 1991 1309 1228 531
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-32" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_3">
<g id="line2d_3">
<g>
<use xlink:href="#m1c080dd210" x="203.694545" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_3">
<!-- 0.4 -->
<g transform="translate(195.742983 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-34" d="M 2419 4116
L 825 1625
L 2419 1625
L 2419 4116
z
M 2253 4666
L 3047 4666
L 3047 1625
L 3713 1625
L 3713 1100
L 3047 1100
L 3047 0
L 2419 0
L 2419 1100
L 313 1100
L 313 1709
L 2253 4666
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-34" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_4">
<g id="line2d_4">
<g>
<use xlink:href="#m1c080dd210" x="268.625455" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_4">
<!-- 0.6 -->
<g transform="translate(260.673892 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-36" d="M 2113 2584
Q 1688 2584 1439 2293
Q 1191 2003 1191 1497
Q 1191 994 1439 701
Q 1688 409 2113 409
Q 2538 409 2786 701
Q 3034 994 3034 1497
Q 3034 2003 2786 2293
Q 2538 2584 2113 2584
z
M 3366 4563
L 3366 3988
Q 3128 4100 2886 4159
Q 2644 4219 2406 4219
Q 1781 4219 1451 3797
Q 1122 3375 1075 2522
Q 1259 2794 1537 2939
Q 1816 3084 2150 3084
Q 2853 3084 3261 2657
Q 3669 2231 3669 1497
Q 3669 778 3244 343
Q 2819 -91 2113 -91
Q 1303 -91 875 529
Q 447 1150 447 2328
Q 447 3434 972 4092
Q 1497 4750 2381 4750
Q 2619 4750 2861 4703
Q 3103 4656 3366 4563
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-36" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_5">
<g id="line2d_5">
<g>
<use xlink:href="#m1c080dd210" x="333.556364" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_5">
<!-- 0.8 -->
<g transform="translate(325.604801 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-38" d="M 2034 2216
Q 1584 2216 1326 1975
Q 1069 1734 1069 1313
Q 1069 891 1326 650
Q 1584 409 2034 409
Q 2484 409 2743 651
Q 3003 894 3003 1313
Q 3003 1734 2745 1975
Q 2488 2216 2034 2216
z
M 1403 2484
Q 997 2584 770 2862
Q 544 3141 544 3541
Q 544 4100 942 4425
Q 1341 4750 2034 4750
Q 2731 4750 3128 4425
Q 3525 4100 3525 3541
Q 3525 3141 3298 2862
Q 3072 2584 2669 2484
Q 3125 2378 3379 2068
Q 3634 1759 3634 1313
Q 3634 634 3220 271
Q 2806 -91 2034 -91
Q 1263 -91 848 271
Q 434 634 434 1313
Q 434 1759 690 2068
Q 947 2378 1403 2484
z
M 1172 3481
Q 1172 3119 1398 2916
Q 1625 2713 2034 2713
Q 2441 2713 2670 2916
Q 2900 3119 2900 3481
Q 2900 3844 2670 4047
Q 2441 4250 2034 4250
Q 1625 4250 1398 4047
Q 1172 3844 1172 3481
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-38" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_6">
<g id="line2d_6">
<g>
<use xlink:href="#m1c080dd210" x="398.487273" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_6">
<!-- 1.0 -->
<g transform="translate(390.53571 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-31" d="M 794 531
L 1825 531
L 1825 4091
L 703 3866
L 703 4441
L 1819 4666
L 2450 4666
L 2450 531
L 3481 531
L 3481 0
L 794 0
L 794 531
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
</g>
<g id="matplotlib.axis_2">
<g id="ytick_1">
<g id="line2d_7">
<defs>
<path id="mc16e4d734c" d="M 0 0
L -3.5 0
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#mc16e4d734c" x="57.6" y="295.488" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_7">
<!-- 1.0 -->
<g transform="translate(34.696875 299.287219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_2">
<g id="line2d_8">
<g>
<use xlink:href="#mc16e4d734c" x="57.6" y="247.104" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_8">
<!-- 1.2 -->
<g transform="translate(34.696875 250.903219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-32" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_3">
<g id="line2d_9">
<g>
<use xlink:href="#mc16e4d734c" x="57.6" y="198.72" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_9">
<!-- 1.4 -->
<g transform="translate(34.696875 202.519219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-34" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_4">
<g id="line2d_10">
<g>
<use xlink:href="#mc16e4d734c" x="57.6" y="150.336" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_10">
<!-- 1.6 -->
<g transform="translate(34.696875 154.135219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-36" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_5">
<g id="line2d_11">
<g>
<use xlink:href="#mc16e4d734c" x="57.6" y="101.952" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_11">
<!-- 1.8 -->
<g transform="translate(34.696875 105.751219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-38" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_6">
<g id="line2d_12">
<g>
<use xlink:href="#mc16e4d734c" x="57.6" y="53.568" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_12">
<!-- 2.0 -->
<g transform="translate(34.696875 57.367219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-32"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
</g>
<g id="line2d_13">
<path d="M 73.832727 295.488
L 398.487273 53.568
" clip-path="url(#p9f9c756112)" style="fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="patch_3">
<path d="M 57.6 307.584
L 57.6 41.472
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_4">
<path d="M 414.72 307.584
L 414.72 41.472
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_5">
<path d="M 57.6 307.584
L 414.72 307.584
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_6">
<path d="M 57.6 41.472
L 414.72 41.472
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
</g>
</g>
<defs>
<clipPath id="p9f9c756112">
<rect x="57.6" y="41.472" width="357.12" height="266.112"/>
</clipPath>
</defs>
</svg>
[-- Attachment #7: x-transparent.svg --]
[-- Type: image/svg+xml, Size: 11533 bytes --]
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" width="460.8pt" height="345.6pt" viewBox="0 0 460.8 345.6" xmlns="http://www.w3.org/2000/svg" version="1.1">
<metadata>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2024-09-22T08:55:11.239576</dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:creator>
<cc:Agent>
<dc:title>Matplotlib v3.9.2, https://matplotlib.org/</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<defs>
<style type="text/css">*{stroke-linejoin: round; stroke-linecap: butt}</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M 0 345.6
L 460.8 345.6
L 460.8 0
L 0 0
L 0 345.6
z
" style="fill: none"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 57.6 307.584
L 414.72 307.584
L 414.72 41.472
L 57.6 41.472
L 57.6 307.584
z
" style="fill: none"/>
</g>
<g id="matplotlib.axis_1">
<g id="xtick_1">
<g id="line2d_1">
<defs>
<path id="m55b86e9086" d="M 0 0
L 0 3.5
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#m55b86e9086" x="73.832727" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_1">
<!-- 0.0 -->
<g transform="translate(65.881165 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-30" d="M 2034 4250
Q 1547 4250 1301 3770
Q 1056 3291 1056 2328
Q 1056 1369 1301 889
Q 1547 409 2034 409
Q 2525 409 2770 889
Q 3016 1369 3016 2328
Q 3016 3291 2770 3770
Q 2525 4250 2034 4250
z
M 2034 4750
Q 2819 4750 3233 4129
Q 3647 3509 3647 2328
Q 3647 1150 3233 529
Q 2819 -91 2034 -91
Q 1250 -91 836 529
Q 422 1150 422 2328
Q 422 3509 836 4129
Q 1250 4750 2034 4750
z
" transform="scale(0.015625)"/>
<path id="DejaVuSans-2e" d="M 684 794
L 1344 794
L 1344 0
L 684 0
L 684 794
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_2">
<g id="line2d_2">
<g>
<use xlink:href="#m55b86e9086" x="138.763636" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_2">
<!-- 0.2 -->
<g transform="translate(130.812074 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-32" d="M 1228 531
L 3431 531
L 3431 0
L 469 0
L 469 531
Q 828 903 1448 1529
Q 2069 2156 2228 2338
Q 2531 2678 2651 2914
Q 2772 3150 2772 3378
Q 2772 3750 2511 3984
Q 2250 4219 1831 4219
Q 1534 4219 1204 4116
Q 875 4013 500 3803
L 500 4441
Q 881 4594 1212 4672
Q 1544 4750 1819 4750
Q 2544 4750 2975 4387
Q 3406 4025 3406 3419
Q 3406 3131 3298 2873
Q 3191 2616 2906 2266
Q 2828 2175 2409 1742
Q 1991 1309 1228 531
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-32" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_3">
<g id="line2d_3">
<g>
<use xlink:href="#m55b86e9086" x="203.694545" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_3">
<!-- 0.4 -->
<g transform="translate(195.742983 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-34" d="M 2419 4116
L 825 1625
L 2419 1625
L 2419 4116
z
M 2253 4666
L 3047 4666
L 3047 1625
L 3713 1625
L 3713 1100
L 3047 1100
L 3047 0
L 2419 0
L 2419 1100
L 313 1100
L 313 1709
L 2253 4666
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-34" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_4">
<g id="line2d_4">
<g>
<use xlink:href="#m55b86e9086" x="268.625455" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_4">
<!-- 0.6 -->
<g transform="translate(260.673892 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-36" d="M 2113 2584
Q 1688 2584 1439 2293
Q 1191 2003 1191 1497
Q 1191 994 1439 701
Q 1688 409 2113 409
Q 2538 409 2786 701
Q 3034 994 3034 1497
Q 3034 2003 2786 2293
Q 2538 2584 2113 2584
z
M 3366 4563
L 3366 3988
Q 3128 4100 2886 4159
Q 2644 4219 2406 4219
Q 1781 4219 1451 3797
Q 1122 3375 1075 2522
Q 1259 2794 1537 2939
Q 1816 3084 2150 3084
Q 2853 3084 3261 2657
Q 3669 2231 3669 1497
Q 3669 778 3244 343
Q 2819 -91 2113 -91
Q 1303 -91 875 529
Q 447 1150 447 2328
Q 447 3434 972 4092
Q 1497 4750 2381 4750
Q 2619 4750 2861 4703
Q 3103 4656 3366 4563
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-36" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_5">
<g id="line2d_5">
<g>
<use xlink:href="#m55b86e9086" x="333.556364" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_5">
<!-- 0.8 -->
<g transform="translate(325.604801 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-38" d="M 2034 2216
Q 1584 2216 1326 1975
Q 1069 1734 1069 1313
Q 1069 891 1326 650
Q 1584 409 2034 409
Q 2484 409 2743 651
Q 3003 894 3003 1313
Q 3003 1734 2745 1975
Q 2488 2216 2034 2216
z
M 1403 2484
Q 997 2584 770 2862
Q 544 3141 544 3541
Q 544 4100 942 4425
Q 1341 4750 2034 4750
Q 2731 4750 3128 4425
Q 3525 4100 3525 3541
Q 3525 3141 3298 2862
Q 3072 2584 2669 2484
Q 3125 2378 3379 2068
Q 3634 1759 3634 1313
Q 3634 634 3220 271
Q 2806 -91 2034 -91
Q 1263 -91 848 271
Q 434 634 434 1313
Q 434 1759 690 2068
Q 947 2378 1403 2484
z
M 1172 3481
Q 1172 3119 1398 2916
Q 1625 2713 2034 2713
Q 2441 2713 2670 2916
Q 2900 3119 2900 3481
Q 2900 3844 2670 4047
Q 2441 4250 2034 4250
Q 1625 4250 1398 4047
Q 1172 3844 1172 3481
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-30"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-38" x="95.410156"/>
</g>
</g>
</g>
<g id="xtick_6">
<g id="line2d_6">
<g>
<use xlink:href="#m55b86e9086" x="398.487273" y="307.584" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_6">
<!-- 1.0 -->
<g transform="translate(390.53571 322.182437) scale(0.1 -0.1)">
<defs>
<path id="DejaVuSans-31" d="M 794 531
L 1825 531
L 1825 4091
L 703 3866
L 703 4441
L 1819 4666
L 2450 4666
L 2450 531
L 3481 531
L 3481 0
L 794 0
L 794 531
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
</g>
<g id="matplotlib.axis_2">
<g id="ytick_1">
<g id="line2d_7">
<defs>
<path id="m38511e0c08" d="M 0 0
L -3.5 0
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#m38511e0c08" x="57.6" y="295.488" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_7">
<!-- 1.0 -->
<g transform="translate(34.696875 299.287219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_2">
<g id="line2d_8">
<g>
<use xlink:href="#m38511e0c08" x="57.6" y="247.104" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_8">
<!-- 1.2 -->
<g transform="translate(34.696875 250.903219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-32" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_3">
<g id="line2d_9">
<g>
<use xlink:href="#m38511e0c08" x="57.6" y="198.72" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_9">
<!-- 1.4 -->
<g transform="translate(34.696875 202.519219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-34" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_4">
<g id="line2d_10">
<g>
<use xlink:href="#m38511e0c08" x="57.6" y="150.336" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_10">
<!-- 1.6 -->
<g transform="translate(34.696875 154.135219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-36" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_5">
<g id="line2d_11">
<g>
<use xlink:href="#m38511e0c08" x="57.6" y="101.952" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_11">
<!-- 1.8 -->
<g transform="translate(34.696875 105.751219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-31"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-38" x="95.410156"/>
</g>
</g>
</g>
<g id="ytick_6">
<g id="line2d_12">
<g>
<use xlink:href="#m38511e0c08" x="57.6" y="53.568" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_12">
<!-- 2.0 -->
<g transform="translate(34.696875 57.367219) scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-32"/>
<use xlink:href="#DejaVuSans-2e" x="63.623047"/>
<use xlink:href="#DejaVuSans-30" x="95.410156"/>
</g>
</g>
</g>
</g>
<g id="line2d_13">
<path d="M 73.832727 295.488
L 398.487273 53.568
" clip-path="url(#p50cfba2944)" style="fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="patch_3">
<path d="M 57.6 307.584
L 57.6 41.472
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_4">
<path d="M 414.72 307.584
L 414.72 41.472
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_5">
<path d="M 57.6 307.584
L 414.72 307.584
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
<g id="patch_6">
<path d="M 57.6 41.472
L 414.72 41.472
" style="fill: none; stroke: #000000; stroke-width: 0.8; stroke-linejoin: miter; stroke-linecap: square"/>
</g>
</g>
</g>
<defs>
<clipPath id="p50cfba2944">
<rect x="57.6" y="41.472" width="357.12" height="266.112"/>
</clipPath>
</defs>
</svg>
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#73417: 30.0.90; SVG text color on dark background
2024-09-22 7:25 bug#73417: 30.0.90; SVG text color on dark background Augusto Stoffel
@ 2024-09-22 7:58 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-09-22 7:58 UTC (permalink / raw)
To: Augusto Stoffel; +Cc: 73417
> From: Augusto Stoffel <arstoffel@gmail.com>
> Date: Sun, 22 Sep 2024 09:25:10 +0200
>
> When I open the attached SVG files in Emacs with a dark background
> theme, I notice that the text color "adapts" to the theme and becomes
> white. This works nicely (but see below) when the SVG has a transparent
> background (example on the right), but renders unreadable a SVG with
> regular white background (example on the left).
You (or a Lisp program which displays such SVG) are supposed to define
a suitable face for it, to countermand these situations. When Emacs
displays an SVG image, it takes the face colors into consideration, if
the colors are defined for the face.
> I would argue that Emacs should the same behavior as web browsers, for 2
> reasons:
> - While it might seem nice to adapt text color to the surroundings, note
> that the right-hand side example is in Emacs is still problematic, since
> one can't really see the black square frame around the blue plot.
> - It would be hard to argue with any SVG producer that their SVGs are
> broken if browsers display them just fine.
Emacs doesn't automatically "fix" colors because they are unreadable,
it leaves that to the Lisp programs. We don't do that for text, and
I'm not sure I understand why we should make SVG an exception. From
the Emacs POV, SVG is just a display element, similar to character
glyphs, so we use the same general strategy here.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-22 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-22 7:25 bug#73417: 30.0.90; SVG text color on dark background Augusto Stoffel
2024-09-22 7:58 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).