Question

I need to create application, using which user can handle text in graphical interface. User can move text objects inside parent panel/canvas or something, change fonts, change size of characters (height, width), spacing between characters and so on.

Target of application:

in the end of handling text (or while handling) user will get a position of every character, height and width of characters, distance between characters (spacing). And all those measures must be in same unit of measure (pixels, points).

So question is: What kind of framework (.NET, Silverlight, XNA, Flash, Java, HTML 5, Javascript and so on) can be used for this.

I am “sold my soul” to Microsoft (worked before only with .NET), but have some experience in Flash, HTML, Javascript, Java. So all proposals are welcome

Trying to approach with Silverlight, but only problem was with spacing (dynamically change), when trying used Glyphs it worked in some way, only problem was: when with Glyphs spacing was changed(same for all characters), in visual spacing was different for all characters. So spacing problem is biggest for right now.

Another approach can be a handle text as a collection of characters, and calculate by myself distance between characters. But in application every user can use own custom fonts (here my knowledge not enough). So i afraid that we will need to create (draw) every character of font before can use custom fonts.

I found in Internet some applications which doing almost same thing (done in Javascript), but before start want to get more information about other possibilities.

Was it helpful?

Solution

With nobody give some advices about this,I decide to answer own question, because found already a solution how will approach to this project.

So I found a new(for me at least) version of Silverlight hav a new Property CharachterSpacing for Elements which handling with text(TextBox, Label and so on). Using this property I can change dynamically a text spacing.

Documents tell us that this property use as a unit integer which is 1000s of font's em unit. About em:

"Em size is a typographical measure that specifies the approximate width of the capital letter "M" in the Roman alphabet, measured in the units that are prevalent in a particular technology. Silverlight em sizes are given in pixels. The apparent visual size of the em size varies per font.”

So this give a very good basement for counting a real distance between charachters.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top