我需要一个上标来显示x raise到b。
我能够将x加注到2(即x平方), x也升到3(即x立方体)..
但现在我需要使用上标显示x raise到b ..
请帮助..
答案 0 :(得分:4)
如果字体支持,您可以尝试\u1D47
(ᵇ)。
请注意,在Unicode中,这并不是真正的“上标b”,而是一个语音符号。找到一个富文本标签库以获得正确的解决方案。
a = ᵃ = \u1d43 (modifier letter small a)
b = ᵇ = \u1d47 (modifier letter small b)
c = ᶜ = \u1d9c (modifier letter small c)
d = ᵈ = \u1d48 (modifier letter small d)
e = ᵉ = \u1d49 (modifier letter small e)
f = ᶠ = \u1da0 (modifier letter small f)
g = ᵍ = \u1d4d (modifier letter small g)
h = ʰ = \u02b0 (modifier letter small h)
i = ⁱ = \u2071 (superscript latin small letter i)
j = ʲ = \u02b2 (modifier letter small j)
k = ᵏ = \u1d4f (modifier letter small k)
l = ˡ = \u02e1 (modifier letter small l)
m = ᵐ = \u1d50 (modifier letter small m)
n = ⁿ = \u207f (superscript latin small letter n)
o = ᵒ = \u1d52 (modifier letter small o)
p = ᵖ = \u1d56 (modifier letter small p)
q = n/a
r = ʳ = \u02b3 (modifier letter small r)
s = ˢ = \u02e2 (modifier letter small s)
t = ᵗ = \u1d57 (modifier letter small t)
u = ᵘ = \u1d58 (modifier letter small u)
v = ᵛ = \u1d5b (modifier letter small v)
w = ʷ = \u02b7 (modifier letter small w)
x = ˣ = \u02e3 (modifier letter small x)
y = ʸ = \u02b8 (modifier letter small y)
z = ᶻ = \u1dbb (modifier letter small z)
答案 1 :(得分:1)
您可以在文本字符串中使用html <sup>
标记,然后使用github提供的NSAttributedString-Additions-for-HTML显示它。