aliftype / euler-otf

An abandoned OpenType/Unicode math port of AMS Euler font
Other
96 stars 12 forks source link

Blackboard bold #2

Open adityam opened 14 years ago

adityam commented 14 years ago

Blackboard bold does not work with Context. Not sure if it is the fault of context mappings or are the glyphs missing from the font.

\starttypescript    [math]     [euler][name]
  \definefontsynonym[MathRoman][name:Neo Euler] [features=math]
\stoptypescript

\definetypeface [mainface] [rm] [serif] [palatino] [default] 
\definetypeface [mainface] [mm] [math]  [euler] [default]  

\setupbodyfont[mainface,12pt]
\starttext
$\Bbb ABCDEFGHIJKLMNOPQRSTUVWXYZ$
\stoptext
khaledhosny commented 14 years ago

The font has no blackboard glyphs, I've some experimental glyphs in the mathbb branch if you want to try it, but I don't dare merging it to the main font :).

adityam commented 14 years ago

Thanks. For the record, I need to call the fonts explicitly by filename: file:eulerbb

khaledhosny commented 14 years ago

BTW, $\Bbb \pi \gamma \Gamma \Pi \sum$ doesn't give the BB alternatives of those glyphs.

adityam commented 14 years ago

Here is a patch for math-map.lua to get this to work. I will ask Hans to merge this with the beta.

diff --git a/math-map.lua b/math-map.lua
index b3c5c29..e87f145 100644
--- a/math-map.lua
+++ b/math-map.lua
@@ -213,6 +213,15 @@ mathematics.alphabets = {
                 [0x0005A]=0x02124,
             },
             lcletters = 0x1D552,
+            lcgreek = { -- gamma pi
+                [0x03B3]=0x0213C, [0x03C0]=0x0213D,
+            },
+            ucgreek = { -- Gamma pi
+                [0x0393]=0x0213E, [0x03A0]=0x0213F, 
+            },
+            symbols = { -- sum
+              [0x2211]=0x02140,
+            },
         },
     },
     fraktur = { -- ok
@@ -294,9 +303,15 @@ alphabets.monospaced.it         = alphabets.sansserif.tf
 alphabets.monospaced.bf         = alphabets.sansserif.tf
 alphabets.monospaced.bi         = alphabets.sansserif.bf

-alphabets.blackboard.tf.symbols = alphabets.regular.tf.symbols
-alphabets.blackboard.tf.lcgreek = alphabets.regular.tf.lcgreek
-alphabets.blackboard.tf.ucgreek = alphabets.regular.tf.ucgreek
+
+-- alphabets.blackboard.tf.symbols = alphabets.regular.tf.symbols
+-- alphabets.blackboard.tf.lcgreek = alphabets.regular.tf.lcgreek
+-- alphabets.blackboard.tf.ucgreek = alphabets.regular.tf.ucgreek
+
+alphabets.blackboard.tf.symbols = table.merge(alphabets.regular.tf.symbols, alphabets.blackboard.tf.symbols)
+alphabets.blackboard.tf.lcgreek = table.merge(alphabets.regular.tf.lcgreek, alphabets.blackboard.tf.lcgreek)
+alphabets.blackboard.tf.ucgreek = table.merge(alphabets.regular.tf.ucgreek, alphabets.blackboard.tf.ucgreek)
+
 alphabets.blackboard.it         = alphabets.blackboard.tf
 alphabets.blackboard.bf         = alphabets.blackboard.tf
 alphabets.blackboard.bi         = alphabets.blackboard.bf
adityam commented 12 years ago

Are there any plans to merge the blackboard glyphs to the main font?

khaledhosny commented 12 years ago

Not currently, since I've no time for working on this font right now.