BeBits Information Developer Central Submit Application Your Account Web Links Contact Us
BeBits
LocalizedDefaults

Problems with Text Alignment and Font Direction

Whenever a developer creates an object using the Be API, the object is created with certain default values specified for fields that the developer doesn't explicitly set in the constructor. For example: The BeBook has this to say about BTextView.

The constructor establishes the following default properties for a new BTextView: ... The text is left-aligned. (See SetAlignment().) ...

This is a problem for users who are in right-aligned languages, such as the user from Israel who recently wrote me about having this trouble with Hebrew. This is preventing adoption of the OS. Understandibly so, because I know I'd have trouble with an OS that forced me to type text from right to left!

A starting solution

This can be solved by having the operating system default to a localized default rather than the arbitrary left-alignment. Note that a right-alignment also has to be tied together with a font direction of right-to-left, or you simply get left to right typing that sticks to the right hand side.

Changing this default won't have an impact on the API. However, it may be advisable to add some constants such as B_FONT_NORMAL and B_FONT_REVERSE, which do the "appropriate" localized action, for BFont's font_direction enum. Similarly for the TextView, SetAlignment could accept (B_ALIGN_NORMAL, B_ALIGN_REVERSE). Names are obviously not important here for my point. :-)

Such a solution needs to be applied to other text input widgets as well, of course.

Problems with Default Fonts

The system always uses the same fonts. I don't believe that it even installs a font set that has a sufficient number of chinese characters for general use. (The japanese one is limited in this regard.) The font sets don't cover korean at all if I am not mistaken.

A starting solution

When the localization choice is made, the default system font should be set to an appropriate one. If we don't have an appropriate font, someone should find one we can use. :-)

shatty!


PAGE VISITS
1,107

LINKS HERE
LocalizationKit
LocalizationIssues

NEW PAGES
CrosscompilingFirefox
BuildingCairo
StoringDataInBetweenOSes
ScriptingBeosRuby
ScriptingBeosPython
HaikuOS
QemUwinbe
MinimalBeos
XpMBRoverwrite
SteveSakoman

RECENT CHANGES
BuildingFirebird
FrontPage
BeAcademic
CrosscompilingFirefox
HowTo
BuildingCairo
BeCommunity
PlayGround
CorumIII
SupportForMachinesAndArchitectures
Edit Page | Front Page | BeBits
Site content is in the public domain. Unless otherwise noted, everything else is copyright © 1999-2009 BeBits. All Rights Reserved.
For more legal trivia, take a gander at our
Legal Stuff page and our Privacy Statement.