Font Antialiasing vary in textarea in Flex 3.5 - apache-flex

A weird bug occurs when displaying text, the antialiasing seems to change over the span of the textarea as shown in the image. Notice the "x" on the bottom left side compared to the "u" in the upper right side.
I'm using Arial thats embedded and i've tried with both advancedAntialiasing set to false or true, but this bug still occurs.
I'm using the Flex 3.5 SDK in Flash Builder 4.0.
The player from which i've taken the screenshot is is Flash Player 11
My question is how is this possible, and what can i do to remove the weird behavior?

This behaviour was due to a z coordinate set to the textarea. Slightly surprising effect. Setting the textarea z to 0 removed any odd blur.

Related

Unable to reduce iframe size in ios7

In IOS7 (Safari) we are seeing an issue where the iframe will not accept a lower width/height. For example, on an orientation change event the new width maybe say 600 vs 320. While it will resize to 600, going back to portrait mode, the width will remain at 600 instead of resetting back to 320. We have confirmed the values are being set correctly within the attributes of the iframe, but the css values are remaining at the previous larger values. We've tried clearing the style attribute altogether, resetting the dimensions to 0 directly before setting the new values, etc. Nothing seems to take affect. I'm leaning toward believing this is a safari bug. Has anyone else experienced this? All of the other posts that are similar all seem to be reporting scrolling issues and not resizing issues.
IOS will show all visible content, so you can't hide the overflow of an iframe. Is your content wider than the iframe? I have a feeling it might be

Center content in android 4.4 webview

I'm displaying mathematical expressions in a webview (using jqmath library and some CSS). One requirement is that expressions should be centred, and here's what I use to achieve that:
<html><head><style type='text/css'>html,body {margin: 0;padding: 0;width: 100%;height: 100%;}html {display: table;}body {display: table-cell;vertical-align: middle;text-align: center;}</style></head><body><p>here goes the expression</p></body></html>
Since rendering math takes some time, the webview is hidden while the expression is rendering, and displayed only when it is ready (once the WebViewClient's onPageFinished has been called). This worked well until Android 4.4.
The problem with the new webview seems to be that it only applies CSS when it is visible on screen. So after revealing the hidden webview, the expression first appears in the top left corner, and only after ~0.1 seconds "jumps" to the center. This looks ugly, since I have to display many expressions in quick succession.
A related problem is described in this question: width:100% in CSS not rendering well in Android 4.4. The asker was able to solve his problem by removing the display: table; from html, but that doesn't work in my case.
So is there a way to either:
(a) force the new (Chromium-based) webview to render content while it is not visible, or
(b) display the content at the center from the beginning (without first displaying it in the top left corner).
It is not true that the KK WebView applies CSS only when visible on screen:
the WebView will not size itself if it has visibility set to GONE because the Android framework will call layout-related methods on it (like layout and onSizeChanged). This might be what you're seeing. Try setting the visibility to INVISIBLE instead.
WebViewClient.onPageFinished is not a reliable trigger for showing your WebView. What the callback really means is that the resource for the main frame had been loaded from the network. Unfortunately there never was a reliable callback that would tell you 'your content is ready to be displayed' - what you're describing probably happened to work because of particular timing. The most reliable way to not show unfinished content would be to do so in the HTML/CSS.
you might be using WebView.loadDataWithBaseUrl to load your contents into a new/blank WebView - this API is has an effect similar to re-writing the page's content (rather than issuing a 'real' navigation) and can result in weird layout. If possible use loadData or loadUrl. If neither of those are feasible try calling loadUrl("data:text/html,<body style=\"margin: 0px;\"/>"); before loading the real content (wait at least till you get an WebViewClient.onPageStarted callback for that bootstrap URL).
you might be setting height to WRAP_CONTENTS. This is very unlikely to cause the issues you're describing, but it would be good to rule out. Try setting a width of MATCH_PARENT and a height with a fixed number of pixels.

Poor text scaling with Qt Quick 1.1 / QML

I am developing a software application using Qt 4.8.4 (MSVC 2010) on a Windows 7 PC. I have just made the switch from the QWidget framework to the QML / QtQuick 1.1 declarative framework however I have noticed that in QtQuick/QML, text scaling is quite poor. Letters are often cut off or skewed slightly.
In the image below, the text has been scaled due to a window resize yet it looks different everytime.
Here is the scaling function that I used:
scale: paintedWidth > maxWidth ? Math.max((maxWidth / Math.max(paintedWidth, 1)), 0.1) : 1
Basically this scaling function scales the text down only if it is larger then the size of the container that it is in. It works as it should.
I was just wondering if there is any possible way to improve text scaling in QML/Qt Quick 1.1 and if anyone else has noticed this issue?
I know that some work has been done in regards to text scaling in QtQuick 2 but unfortunately upgrading our UI to QtQuick 2 is not a possibility right now due to compatibility issues.
The first thing to try is setting smooth: true
If you're animating the scaling then you may still notice irregularities due to hinting as the fonts are rendered at different sizes. You may have some success in forcing the Text element into a code path that caches the text to an image, which will then be scaled, rather than painting the text directly:
smooth: true
style: Text.Raised
styleColor: "transparent"
Another reason for the appearance you're getting may be that the text is not being positioned pixel aligned, i.e. y is not a whole number, or y of a parent element is not a whole number.

QGraphicsWebView incorrectly expands horizontally with unused white bars (window.outerWidth >> window.innerWidth)

I'm using a view hierarchy of
QMainWindow > central widget > QVBoxLayout > QGraphicsView (800x600 fixed) > class deriving from QGraphicsScene > QGraphicsWebView (800x600)
When I load a jQuery Mobile powered HTML file and use the horizontal slide transition between pages, the value of window.outerWidth grows to 2400 pixels. But the actual page width, and value of window.innerWidth, remains at 800. The web view then shows 800 pixel-wide white bars at the left and right (horizontal scrollbar also expands to 2400px), with the new jQM "page" in the middle. Right-clicking in the white bars does not show the QtWebView context menu, but right-clicking in the middle works. I enabled developer tools [1] which told me that the HTML, BODY and DATA-ROLE="page" elements have the correct width of 800px.
This is working in browsers like Firefox and Chrome, so I think it's a bug in Qt's web view implementation or a setting that I have missed. The problem seems to come from the fact that the jQM pages which are sliding in/out during transitions are considered for the width. Why does window.outerWidth get such a wrong value? Note that any size policies on the web view do not have an effect. Any ideas what else I could try?
[1] "Inspect" context menu option:
QWebSettings::globalSettings()->setAttribute(
QWebSettings::DeveloperExtrasEnabled,
true);
Solved it by upgrading to Qt 5 which has the latest WebKit. It however creates new trouble, so first try if the rest of your web pages work before switching to the newly released 5.0.0.

Reporting Services chart text is blurry when rendered in ReportViewer control on web page

Issue
We are rendering a bar chart on a web page using a Reporting Services report and the ReportViewer control. Sometimes the text on the chart is sharp:
But most of the time, the text on the chart is blurry:
What is going on?
Steps Taken to Resolve and Other Information
Extensive search of web and SO
Tried different browsers, users and machines; couldn't determine rhyme or reason to blurriness
Tried several settings of SSRS report properties DynamicHeight and DynamicWidth
In Firefox, when right-clicking on the chart image and choosing View image, the displayed image is always sharp
The issue seems more prominent on charts with a border; removed border on chart, but issue remains
Affects Browsers
Firefox 15.0
Chrome 23.0.1271.97 m
IE 9 but only while in Browser Mode=IE9, Document Mode=IE9 Standards
Environment
Visual Studio 2010 Pro
.NET 4.0
IIS 7.0
Reporting Services 2008
ReportViewer control version 10
Cause
The ReportViewer control renders charts as a PNG image. The ReportViewer adds width, height, and min-width properties to the CSS for the image. These CSS properties cause the image to undergo scaling to a slightly smaller size in the browser. The image scaling causes the observed blurriness.
Resolution
The issue is resolved in our environment by using additional CSS to override several CSS properties rendered by the ReportViewer. The Reporting Services chart is given a special tag in BIDS so a CSS selector can find the affected image.
Step 1. Give the chart a unique value for its ToolTip property:
(The unique value in this example is MyOfficeChart.)
When the chart is rendered as an <img>, the <img> tag's alt and title attributes are set to this value.
Step 2. Create CSS to select the <img> by the unique value of the title attribute, and override the issue-causing CSS:
img[title$='MyOfficeChart']
{
height:auto !important;
width:auto !important;
min-width:0 !important;
}
These steps resolve the issue for all browsers and users, and whether the chart has a border or not.
An easy was to resolve this is by putting a rectangle directly into your tablix cell, and then put the chart inside of that rectangle. (Instead of having the chart directly in the tablix cell.)
Not 100% sure why it works... but it does.
This is not proper solution but could help. The steps are as follows:
Open report rdl in report builder
select the chart's text, that gets blurred
Type 'C' in Font Style (on top menu) and press enter
Font style change but unknown
Try to run and see the difference

Resources