News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

asian language font size and font type

Started by Baloch, May 13, 2012, 11:14:05 AM

Previous topic - Next topic

Baloch

Hello there

I love smf but exhaust to edit all URDU/BALUCHI posts of my members because by default font size is too much small. It would be great if you set font size at least 12 with NOORI NASTALIQUE font type which is standard for URDU.

With thanks and regards
Raji

emanuele

Hello Baloch,

have you  tried to set a different size in index.css?

* emanuele doesn't remember which one is for posts...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Baloch

Quote from: emanuele on May 13, 2012, 11:16:31 AM
Hello Baloch,

have you  tried to set a different size in index.css?

* emanuele doesn't remember which one is for posts...

Not yet but do you think it would resolve my URDU FONT SIZE issue? Because I dont want to change English font size.

emanuele

Of course it will change all the sizes.

Let me try to understand better.
http://www.simplemachines.org/community/index.php?topic=475310.0
Here the font size seems fine...


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Baloch

Quote from: emanuele on May 13, 2012, 11:58:04 AM
Of course it will change all the sizes.

Let me try to understand better.
http://www.simplemachines.org/community/index.php?topic=475310.0
Here the font size seems fine...

From where  can I found index.css file?

Font size in your mentioned post is not okay for my visitors so I need to change it at least at 12.

emanuele

You can find index.css in the "css" directory of the theme you are using.
For example for the default theme it will be in: Themes/default/css/


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Baloch

Quote from: emanuele on May 13, 2012, 12:15:29 PM
You can find index.css in the "css" directory of the theme you are using.
For example for the default theme it will be in: Themes/default/css/

I have changed these lines
Quote
/* Set a fontsize that will look the same in all browsers. */
body
{
   background: #E9EEF2 url(../images/theme/backdrop.png) repeat-x;
/*   font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif;*/
font: 78%/130% "Verdana", "Arial", "Helvetica", sans-serif !important;


with
Quote

/*   font: 89%/160% "Verdana", "Arial", "Helvetica", sans-serif;*/
font: 89%/160% "Verdana", "Arial", "Helvetica", sans-serif !important;


now Urdu text are as per my wish but it disturbed English text too which is not in my need. As well as it destroyed look of complete forum.


emanuele

Try adding something to the class post:
.post
{
margin-top: 0.5em;
clear: right;
font: 89%/160% "Verdana", "Arial", "Helvetica", sans-serif;
}

that should change the size only of the text in the post area.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Baloch

Quote from: emanuele on May 13, 2012, 12:42:39 PM
Try adding something to the class post:
.post
{
margin-top: 0.5em;
clear: right;
font: 89%/160% "Verdana", "Arial", "Helvetica", sans-serif;
}

that should change the size only of the text in the post area.

Thanks I have done but is it not possible to globally change only URDU FONT SIZE and FONT TYPE like this?
http://bamhal.blogspot.com/

emanuele

As far as I know no, it's not possible.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Antechinus

I have actually thought about this before, as the forum I run has an Arabic section. Arabic has the same problem, in that a font size which is fine for English is too small for Arabic.

From memory, Urdu is an RTL language like Arabic. If that is the case, the easiest way of getting what you want is to increase the font-size in rtl.css. That will deal with all RTL languages without affecting anyone who uses English.

If that's not adequate for some reason, then you would have to find some way of calling a different font-size according to which language character set was being used in the actual post. That is going to be a lot trickier.

Another simple option is just to get people to use the BBC font size tag when posting in Urdu. They can increase the size themselves while composing the post. You could even make a special "Urdu size" button if you wanted to.

IchBin™

Should be easy enough to add a small customization that checks the language and then loads the stylesheet for their language to change the font size.
IchBin™        TinyPortal

MrPhil

It sounds like they're looking to leave English (Latin fonts) alone, even on a mixed language page, and only affect RTL fonts. In that case, changing rtl.css might make more sense than "all or nothing" changes to the whole page, depending on the principal language in use, although it could mean many changes to add font-size in many rtl.css properties.

I would first check if all RTL fonts need to be affected, or if only some specific fonts are too small at a given font-size. While the latter could be considered a fault of the font supplier, the former would be a problem for the browser author. Also check what happens on different browsers. All in all, it may be difficult to isolate the need for a specific font-size to a given part of a page that also includes other fonts, both Latin and RTL (bidirectional) languages.

@Baloch -- could you see if this font sizing problem only affects a specifc font, or do all RTL alphabets you use have the same problem? If it's just one font, does switching to another commonly installed Urdu font help? Also, are you aware of your browser's "zoom" function? You should be able to View > Zoom and display a page at a larger size (Ctrl+ and Ctrl- may also work) if one font is giving you eyestrain.


BaghdadGhost

you can do so by adding the following, or modify it as desired, to rtl.css at the bottom of the file. rtl.css is in

your_theme/css

add this

.post, .personalmessage
{
line-height: 1.4em;
    font-family: Helvetica, tahoma, Arial, sans-serif;
    font-size: 135%;
    font-weight: bold;
}



it will only change font, type and size of URDU/BALUCHI posts for those users who has their profile set to a right to left layout.

size of URDU/BALUCHI posts script will go back to normal for those that use left to right.

so it depends on the member profile setup not the language itself.

see attached images


Advertisement: