c# - Alternatives for languages that ad sense doesn't support -


introduction:

i working local website displays local contents in local language.

problem:

unfortunately local language not supported google ads per:

enter image description here

so 1 way thought convert text/string image , display images instead.(server side)

question

i using c# method convert text image. dont understand implementation multi-line text?

or there better way support languages ad sense doesn't support without images?

c# code

            string text = str.trim();             bitmap bitmap = new bitmap(1, 1);             font font = new font("arial", 12, fontstyle.regular, graphicsunit.pixel);             graphics graphics = graphics.fromimage(bitmap);             int width = (int)graphics.measurestring(text, font).width;             int height = (int)graphics.measurestring(text, font).height;             bitmap = new bitmap(bitmap, new size(width, height));             graphics = graphics.fromimage(bitmap);             graphics.clear(color.white);             graphics.smoothingmode = smoothingmode.antialias;             graphics.textrenderinghint = textrenderinghint.antialias;             graphics.drawstring(text, font, new solidbrush(color.fromargb(255, 0, 0)), 0, 0);             graphics.flush();             graphics.dispose();             string filename = path.getfilenamewithoutextension(path.getrandomfilename()) + ".jpg";             bitmap.save(server.mappath("~/app_images/") +"11"+filename, imageformat.jpeg);             //imgtext.imageurl = "~/images/" + filename;             //imgtext.visible = true;             return "~/app_images/my_converted.jpg"; 

if have idea type of problem or refrence/link, please help. time.

in c# can put newline (\r\n) in string.


i edited question more appealing , relevant wider audience. please leave question unmarked while hear more ideas, cheers!


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -