Comments (4)
probably yes. depends on the time i find on the weekend.
from code-128-encoder.
That is a common mistake on part of the font author. The reason for that is that there is a faulty encoder library which was widely used many many years ago, and as a consequence there are a lot of broken fonts and encoders out there.
As this encoder is explicitly standards compliant, i do not want to change its behaviour.
You do have some options though.
- use my code-128-font https://github.com/Holger-Will/code-128-font
- create your own font with the barcode-font-generator https://github.com/Holger-Will/barcode-font-generator
- or you can replace the correct codes with the wrong ones.
as for option 3: i might just implement some kind of quirks mode...
for now here is a patch function which should do the trick ;-)
function patch(x){
var st=x
st=st.replace(/È/g,"Ã")
st=st.replace(/É/g,"Ä")
st=st.replace(/Ê/g,"Å")
st=st.replace(/Ë/g,"Æ")
st=st.replace(/Ì/g,"Ç")
st=st.replace(/Í/g,"È")
st=st.replace(/Î/g,"É")
st=st.replace(/Ï/g,"Ê")
st=st.replace(/Ð/g,"Ë")
st=st.replace(/Ñ/g,"Ì")
st=st.replace(/Ò/g,"Í")
st=st.replace(/Ó/g,"Î")
return st
}
and then
patch(encoder.encode("Test"))
the resulting string should be compatible with the broken fonts you find on the net.
the bug for the broke google font is here: graphicore/librebarcode#9
from code-128-encoder.
Wow, thanks for such an elaborated reply.
from code-128-encoder.
Listening to conversation on librebarcode, are you going to change the barcode mappings on this repo now?
Thanks
from code-128-encoder.
Related Issues (9)
- How can I encode control codes such as 'FUNC 1' HOT 3
- Changelog?
- Uncaught TypeError when used in 'use strict' mode
- Using in React Native TypeError: undefined is not an object (evaluating 'root.Code128Generator') HOT 1
- Wrong checksum glyph
- Font glyph of FNC1 has unnecessary space on left side HOT 4
- When rendering a code in the browser, is there a minimum recommended font size? HOT 2
- Problems that code number can not be generated properly HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code-128-encoder.