Read XeTeX font character ranges from active charmaps
This commit is contained in:
1 parent
fc6d704edf
commit
4e16531a62
9 files changed
+4672
-8
No files matched your search
@@ -370,6 +370,14 @@ impl TfmMetrics {
|
||||
pub fn design_size_pt(&self) -> f64 {
|
||||
self.design_size as f64 / 65536.0
|
||||
}
|
||||
pub(crate) fn character_range(&self) -> [u32; 2] {
|
||||
// TeX normalizes the empty range with bc = 256 on load.
|
||||
if self.bc == 256 {
|
||||
[1, 0]
|
||||
} else {
|
||||
[u32::from(self.bc), u32::from(self.ec)]
|
||||
}
|
||||
}
|
||||
pub fn char_info(&self, c: char) -> Option<CharInfo> {
|
||||
let c = c as u32;
|
||||
if c < u32::from(self.bc) || c > u32::from(self.ec) {
|
||||
|
||||
Reference in new issue
Block a user