Comments (2)
I find the code that split the long content to many parts: words := strings.Split(unicodeText, " ")
But the Chinese will not use a space between two worlds.
// Add a text inside a cell.
func (s *text) Add(text string, cell Cell, textProp props.Text) {
// ...
// Apply Unicode before calc spaces
unicodeText := s.textToUnicode(text, textProp)
stringWidth := s.pdf.GetStringWidth(unicodeText)
words := strings.Split(unicodeText, " ")
// ...
}
from maroto.
Added a new strategy to break line by using dash instead of space. Added in v2.0.0-alpha.22
(https://maroto.io/#/v2/features/customfont?id=custom-font)
from maroto.
Related Issues (20)
- Add ability to position text field from the left
- how to generate pdf with papel continuous HOT 2
- What is the Unit of height and width HOT 1
- Bulk add of pages via goroutines HOT 4
- Default margins should be optional
- Is it possible to load fonts once? HOT 2
- Rotate images
- Rmbedding files
- Centre table HOT 2
- Right alignment of total pages HOT 2
- Add Vertical Line HOT 4
- Transform Images (make them rounded)
- m.SetBackgroundColor() doesn't work on first Col in range HOT 1
- Emoji support HOT 1
- Some languages don't work HOT 1
- Maroto V2 - Thread HOT 11
- Add TTC Font Support HOT 2
- what is maroto HOT 2
- V2 alpa.29 can't compile linker error apple M1 HOT 3
- V2 example crash. 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 maroto.